Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment with Token doesn't work #18

Closed
firatakandere opened this issue Aug 25, 2016 · 8 comments
Closed

Payment with Token doesn't work #18

firatakandere opened this issue Aug 25, 2016 · 8 comments

Comments

@firatakandere
Copy link

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
Copy link
Member

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

@drealecs
Copy link
Member

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
Copy link
Author

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
Copy link
Author

and yeah it works in that way.

@drealecs
Copy link
Member

drealecs commented Aug 26, 2016

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
Copy link
Author

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

@drealecs
Copy link
Member

drealecs commented Sep 5, 2016

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

@drealecs
Copy link
Member

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants