Error integrating Redsys payment gateway using PHP API

1

Greetings community. I am finishing a virtual store and I am integrating the payment gateway to the store. The payment gateway is Redsys, I have already integrated and processed payments and everything went well, I have tried several times and well. Now the problem I have is that when I go to the payment gateway to put the data on the card I get an amount that is not the amount of my shopping cart, I will attach two images showing what is happening to me.

This is the summary image of my shopping cart:

And this is already on the payment gateway:

As you can see, the total amount is not the same, the one in my cart is 225 and in the payment gateway I see 2.25. I really can not figure out how to fix this. If anyone has knowledge about this I would greatly appreciate the help, I clarify that all this I have in test mode yet.

    
asked by Alejo Mendoza 15.01.2018 в 00:56
source

1 answer

1

If you check the documentation you will find the following:

  

Ds_Merchant_SumTotal : Required. Represents the total sum of the installment amounts. The last two positions are considered decimals .

The last two positions are considered decimals, so for a value of 225, you must send 22500, that is, add decimals always, but without the comma or period.

    
answered by 15.01.2018 / 14:11
source