VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
139 stars 162 forks source link

ISV_Amount fraction of a penny failing #2407

Closed paulcorke closed 1 year ago

paulcorke commented 1 year ago

Android integration. If we set the "ISV_amount" to anything other than a whole number, an error is returned "(-1000) WRONG_PARAMETERS". Setting it to "0" or "1" is ok, but "1.0" or "1.5" gives the error.

If the amount is 500 and the ISV loading is 0.3% then we should be sending "1.5" as the ISV_amount. How do we do this without triggering the error please?

VivaWalletCustomerSupport commented 1 year ago

Hello @paulcorke,

Thank you for your message. Kindly note that the "ISV amount" should be an integer. If for example the amount is 1.50 € the "ISV_amount" should be 150.

Kind regards, Viva Wallet E-commerce Support Team

paulcorke commented 1 year ago

Hello,

Yes, we are sending everything as pence (cents). So can you please confirm that we cannot send the amount 1.234€ because "ISV_amount" would be "123.4" - which is not an integer.

Thanks,

Paul.

VivaWalletCustomerSupport commented 1 year ago

Hello @paulcorke,

Thank you for the swift response. We would like to inform you that "ISV_amount" parameter cannot have more than two decimal numbers.

Kind regards, Viva Wallet E-commerce Support Team

paulcorke commented 1 year ago

Setting it to the value "1.5" only has one decimal number which seems to fulfil the "cannot have more than two decimal numbers" requirement but I get the "(-1000) WRONG_PARAMETERS" error. Is there some other setting I need to change to allow this? Thanks.

VivaWalletCustomerSupport commented 1 year ago

Hello @paulcorke,

Thank you for your reply. This parameter should be set as an integer. If you wish the amount to be 1.5 € in your code the parameter should have the value 150. The decimal numbers of the amount are set via the integer value of the parameter.

Kind regards, Viva Wallet E-commerce Support Team