question

ezpays avatar image
ezpays asked David Marginian Deactivated commented

failureMessage: 'INV TRAN' on sandbox environment

I am using sandbox account and trying to add payments.
I am using the test credit card details 4242424242424242

{

"paymentId": "Z5HQDG30WS27E",

"result": "DECLINED",

"failureMessage": "INV TRAN"

}

I am using php. this is how i encrypted credit card num:

$rsa = new phpseclib\Crypt\RSA();

$rsa->loadKey([

'e' => new BigInteger(base64_decode($getPay["exponent"]), 256),

'n' => new BigInteger(base64_decode($getPay["modulus"]), 256)

]);

$card = base64_encode($rsa->encrypt($getPay["prefix"].'4242424242424242'));


Please help me to resolve this issue. Thanks

Developer Pay API
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered

You should not be using the Developer Pay API, it is deprecated.

You should be using our ECommerce API. Here is some more information: https://docs.clover.com/docs/clover-development-basics-ecommerce and https://docs.clover.com/docs/ecommerce-api-tutorials.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ezpays avatar image
ezpays answered David Marginian Deactivated commented

Thanks for your reply. I am getting this error. How to resolve it?screen-shot-2021-03-06-at-53840-am.png


5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

https://docs.clover.com/docs/clover-development-basics-ecommerce

You need to pass the access token as a request header - Authorization: Bearer {token}. Your token must have the correct permissions - https://docs.clover.com/docs/ecommerce-app-permissions. Information on 401s in general can be found here - https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html.

If you still need help after reading through the docs above you will need to provide me with details such as your app id, how you are obtaining the token, etc.



0 Likes 0 ·
ezpays avatar image ezpays David Marginian ♦♦ commented ·

I have already passed the validation token. But same error

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ ezpays commented ·

You will need to answer the questions I asked if you would like some help.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community