Commit 258aa0f7 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Script outputs negative amounts

parent 03c81da1
...@@ -84,13 +84,15 @@ if batch_mode: ...@@ -84,13 +84,15 @@ if batch_mode:
if target_language == "zh": # Wechat payment if target_language == "zh": # Wechat payment
def wrapRedirectWithShadow(payment_transaction, web_site): def wrapRedirectWithShadow(payment_transaction, web_site):
if payment_transaction.PaymentTransaction_getTotalPayablePrice() > 0: # getTotalPayble returns a negative value
if payment_transaction.PaymentTransaction_getTotalPayablePrice() < 0:
return payment_transaction.PaymentTransaction_redirectToManualWechatPayment(web_site) return payment_transaction.PaymentTransaction_redirectToManualWechatPayment(web_site)
return payment_transaction.PaymentTransaction_redirectToManualFreePayment(web_site) return payment_transaction.PaymentTransaction_redirectToManualFreePayment(web_site)
else: # Payzen payment else: # Payzen payment
def wrapRedirectWithShadow(payment_transaction, web_site): def wrapRedirectWithShadow(payment_transaction, web_site):
if payment_transaction.PaymentTransaction_getTotalPayablePrice() > 0: # getTotalPayble returns a negative value
if payment_transaction.PaymentTransaction_getTotalPayablePrice() < 0:
return payment_transaction.PaymentTransaction_redirectToManualPayzenPayment(web_site) return payment_transaction.PaymentTransaction_redirectToManualPayzenPayment(web_site)
return payment_transaction.PaymentTransaction_redirectToManualFreePayment(web_site) return payment_transaction.PaymentTransaction_redirectToManualFreePayment(web_site)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment