question

tulasi avatar image
tulasi 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 4264281511117771
["paymentId" => "GY1RFDCK18ETT" , "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"].'4264281511117771'));

Please help me with this issue.
Developer Pay API
1 comment
10 |2000

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

chanel avatar image chanel commented ·

It's possible that the card is expired? Try using a different card number (with an exp date in the future).

0 Likes 0 ·

1 Answer

tulasi avatar image
tulasi answered David Marginian Deactivated commented
I solved it. I should not restrict the RSA to 256. When i removed that it worked.
3 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.

ezpays avatar image ezpays commented ·

Hi, I am new for clover api. I am getting the same error like your post. How did you remove 256?

0 Likes 0 ·
ezpays avatar image ezpays commented ·

can I see your code to be removed 256 what you said?

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

ezpays, please do not cross-post. I have answered your other thread.

0 Likes 0 ·

Welcome to the
Clover Developer Community