Paypal Hosted sandbox cannot complete payment with selected card

viking1111
Contributor
Contributor

When I'm trying to make a payment in the sandbox environment I get this message all the time:
[ERRORCODE] => 5041 [ERRORMSG] => We're sorry, we can't complete this payment with the selected card at this time. Please try another card. )

I tried several different card numbers with no luck. I have also tried the same card which is associated with the test buyer account with no luck.

However paying with paypal accout works fine with that test account.

I cannot find any information about the error message and for why it is happening.

Login to Me Too
1 REPLY 1

MTS_Nacho
Moderator
Moderator

Apologies for the delay.

Are you trying to integrate the PayPal Pro Hosted Solution, as per the following guide?

 

https://www.paypalobjects.com/webstatic/en_GB/developer/docs/pdf/hostedsolution_uk.pdf

 

If that's the case, any random or fake card number will work in Sandbox as long as:

 

- It's not a commonly used number like 4111 .... 1111 as they have been used so many times in the past that they will time out in our Sandbox.

 

- The card number follows the Luhn algoritmh for credit card generation/validation.

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.