PayU-EMEA / alu-client-php

Automatic Live Update Client
https://secure.payu.ro/docs/alu/v3/
25 stars 22 forks source link

Payment with Token doesn't work #18

Closed firatakandere closed 7 years ago

firatakandere commented 8 years ago

Hi,

When I try this example: https://github.com/PayU/alu-client-php/blob/master/examples/tokenPayment.php

The message returns like this: Invalid card number entered.()\nInvalid expiration date entered or the card has expired.(00-)

Am I supposed to encode the token before using it? Because the token format I get by using this example: https://github.com/PayU/alu-client-php/blob/master/examples/createTokenForRecurrentPayment.php

is different from the format of the token used in the tokenPayment.php example.

Thanks in advance.

drealecs commented 8 years ago

No encoding needs to be done on the token. Usually it should be a 32 hex-digits string.

drealecs commented 8 years ago

I can't pinpoint the problem. There might be some operational settings to be done in order to use it. I think it would be better to get in touch with someone from integration department and if they can't help you directly, they could open an internal issue to assist you for more technical details

firatakandere commented 8 years ago

I've just contacted them and they told me it's because CC_ parameters are sent as NULL but expected is empty string. So they should be like this:

"CC_NUMBER" => "", "EXP_MONTH" => "", "EXP_YEAR" => "", "CC_CVV" => "", "CC_OWNER" => "",

firatakandere commented 8 years ago

and yeah it works in that way.

drealecs commented 8 years ago

Sounds familiar. I think CC_CVV is the problem. If you can help to pinpoint the problem further: Can you try to send empty only the CC_CVV to check if it works?

firatakandere commented 8 years ago

Yep it works when I send only CC_CVV as an empty string.

drealecs commented 8 years ago

Thank you very much. I'll take care of the fix further.

drealecs commented 7 years ago

fixed