Paypal says, use CCREJECT-REFUSED for address1 in credit card detail. https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec_fundingfailure10486/
I tried creating new test user (CC credential was automatically created). Login into sandbox and add CC detail I got from first step. I change address line to CCREJECT-REFUSED. Save it. And then tested it, checking out via sandbox. Error 10486 was not triggered.
Any hint?
Mistake I made was to edit the SHIPPING address instead of the BILLING address.
Your best bet is to log directly into https://www.sandbox.paypal.com and hit the 'Profile' tab and try to add or edit a card there.
Watch out for the following :
Make sure you put exactly
CCREJECT-REFUSEDfor BILLING address Line 1 with no spaces and TWOCat the beginningThey seem to be incompetent to keep the site running smoothly at all times so just try again later if you get
Service Temporarily Unavailable.Make sure if you're adding a new card (you can use your own real card number) that you aren't getting a message telling you
This card number is already assigned to another PayPal account. For security reasons, each card may only be assigned to one PayPal accountbecause then you'll not be adding anythingMake sure payment method is actually set to credit card before you hit Submit for the order.
It does actually work though (as of today)
Okay, I was wrong to assume that the error can be triggered using direct CC payment.
As the document suggest:
- You need to create a test user account
- Login into sandbox using fore-mentioned account.
- Change address part of test user CC to:
CCREJECT-REFUSED
Then, in order to test it, run your express checkout flow as usual. But on the last part, do not use direct CC input. Instead, choose the other option -- login into your test user paypal account.
You will then received this kind of response:
TIMESTAMP=2013%2d08%2d19T06%3a50%3a45Z&CORRELATIONID=6761aff7944b&ACK=Failure&VERSION=104&BUILD=7319395&L_ERRORCODE0=10486&L_SHORTMESSAGE0=This%20transaction%20couldn%27t%20be%20completed%2e&L_LONGMESSAGE0=This%20transaction%20couldn%27t%20be%20completed%2e%20Please%20redirect%20your%20customer%20to%20PayPal%2e&L_SEVERITYCODE0=Error
All of these answers are now out of date. It's impossible to add a card with CCREJECT-REFUSED as the address and, if you could, it wouldn't do anything. You should follow the instructions at: https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/
For the majority of APIs exposed by PayPal, this usually involves setting the order amount to the desired error code after enabling negative testing mode for your sandbox business account.
For example, triggering a 10486 via the Express Checkout NVP API would involve setting the AMT to $104.86.
As taking directly from their tutorial: (see step 2)
- Login to https://www.sandbox.paypal.com using your buyer's test PayPal account.
- Replace the contents of the street address Line-1 of the buyer's test credit card, with CCREJECT-REFUSED.
- Execute a typical Express Checkout payment flow against the Sandbox test environment using the same buyer account and with the same credit card that you just modified.
- When you execute DoExpressCheckoutPayment, error code 10486 will be returned. Your code should redirect the buyer back to PayPal using the same redirect URL used to start the checkout flow and the same Express Checkout token.
来源:https://stackoverflow.com/questions/18275583/how-to-manually-trigger-paypal-error-10486-in-sandbox