12-10-2018 02:36 PM
We have noticed that the pricing/amount of the payment form is not showing all of of the cent values. For example, when we set the amount to "25.00" or "25.50", the price on the payment form is shown as "$25.0" or "25.5" respectively. If the payment is "25.01" then the payment is shown correctly.
12-10-2018 08:29 PM
We are aware of the issue within our Python SDK and are working to update them to correct this. In the meantime, the following is a workaround you may use:
The implementation is not when we pass it to the Python SDK.
The Python SDK will send the proper value to the servers and the amount that the merchant sends is properly getting stored in the servers as 50.00 (for example).
It is when the response has reached the merchant’s application that the issue starts happening.
When the SDK tries to show the response (50.00), it removes the zero and shows only one zero after the decimal point (50.0).
The suggested fix is to be implemented when the SDK is trying to print the response, i.e., from SDK to the merchant’s application.
Please do not worry about the amount on the server side. That is assuredly stored properly.
It is just a matter of printing the proper response to the merchant in the proper manner.
The original sample codes suggest something like this:
print('Auth Amount : %s' % transactionDetailsResponse.transaction.authAmount)
print('Settle Amount : %s' % transactionDetailsResponse.transaction.settleAmount)
This needs to be changed to the following. The highlighted text shows what is different:
print('Auth Amount : %s' % Decimal(repr(transactionDetailsResponse.transaction.authAmount)).quantize(Decimal('1.00')))
print('Settle Amount : %s' % Decimal(repr(transactionDetailsResponse.transaction.settleAmount)).quantize(Decimal('1.00')))
Also, if required, they may need to add a new import to the file:
from decimal import *
12-12-2018 09:27 AM
Thanks for the response. But I have been working with you guys to get this fix, and the workaroud below is not something we can do on our end, but the SDK which other agents have been mentioned too.
The last agent suggested that I reach out the community to see if someone else might be able to help.