I can't simulate credit card failures via rejection trigger in the PayPal Sandbox. What is the right flow? - triggers

Hi guys I am trying to simulate card errors in the sandbox. But can't understand how I can trigger it...
Simulate card errors
To simulate credit card failures, pass a rejection trigger in the First Name or Name on Card field in your existing advanced credit and debit card payment integration. You must use a Visa test card number, for example 4012 8888 8888 1881. Use any date in the future for the card expiry date and any three-digit number for the CVV field.
https://developer.paypal.com/api/rest/sandbox/card-testing/#link-simulatecarderrors
Rejection triggers
https://developer.paypal.com/api/rest/sandbox/card-testing/#link-rejectiontriggers
Steps:
Go to the dev.pay pay
Create some personal ACC in the sandbox
enter image description here
Going to the https://www.sandbox.paypal.com/ and log in with this acc
Make a Visa card as a prefer and change the address to the CCREJECT-BANK_ERROR
enter image description here
Go to the Sandbox payment and haven't any payment rejection
I also tried to change the name, but the payment either goes through completely or gives an error without even reaching the payment...
enter image description here
enter image description here
Sorry, I spent a lot of time on this and still can't figure out what I'm doing wrong... Could you tell me?

The list of pre-generated card numbers can only be used for Advanced Credit and Debit Card integrations.
For payments on a PayPal.com checkout page or with the standard "Debit or Credit Card" black button, a newly-generated (random) card from https://developer.paypal.com/api/rest/sandbox/card-testing/#link-creditcardgeneratorfortesting must be used.
To simulate a decline, use CCREJECT-REFUSED in the name or address line 1. Depending on what you are testing you may need to add the card to a www.sandbox.paypal.com payer account with a normal address and change the address line 1 to CCREJECT-REFUSED after adding it.

Related

Bank wasn't able to verify your VISA while payment

I am new to PayPal integration I am testing the payment process but facing some issue while checking out. I tried all mention cards in PayPal website but didn't work any.
Error Message:
Sorry, your bank wasn't able to verify your VISA x-**** at this time.
Please choose another way to pay.
Go to the PayPal Dashboard from the account from which you created the Sandbox accounts and PayPal app. There in the Mock section in the side navigation go to Credit Card Generator. Here select the country that you have chosen while making the business sandbox account and click Generate CC.
Now copy the details of the card generated. Now go to the site where you have integrated PayPal checkout and while making payment instead of choosing the default card click on add Debit/Credit card and add a card with the details the card that you generated. You'll be redirected to a payment page, fill a random password there and your dummy transaction will be completed if everything else in the code is fine.
You need to go to your paypal developer account and then find the mock menu and then select credit card generator
Generate a credit card based on your county
Now try to add a new card on the Paypal page where you are getting error.
Enter the details of the mock card
Then again try to do that payment.
You may be asked to enter a password. Just click on the new-user/forgot password link.
Everything will work fine
I faced this similar issue while integrating Paypal with my app. What I did found that Paypal integration for sandbox account does have an issue while payment if the currency used, is other than USD.
Yes, other solution may work if you want to generate a fake credit card and add it to the Paypal page.
But if you don't want to add any other credit card to the Paypal account and use it for testing purposes, what you can do is to change the country of both business and personal accounts to USA & currency to USD, also set the app to accept the payment in USD.
It will work fine.

Cannot pay in PayPal sandbox?

I am using Express Checkout, and when testing in sandbox, I used to fill in fake but valid credit card numbers, like those produced by this site: http://www.getcreditcardnumbers.com/
It all worked fine until recently I found that PayPal sandbox no longer accepts these numbers. The page keeps showing "The card you entered cannot be used for this payment. Please enter a different credit or debit card number."
However I did find one card number 4444333322221111 that makes PayPal sanbox show a different error: "You might already have an account, Please login." Maybe this means that PayPal does not simply reject any card number.
I also tried creating a test account in Dashboard > Sandbox > Accounts, and use the card number inside the Profile section, but that didn't work either. So how should I test in PayPal sandbox?
When making a testing in Sandbox for credit card, you must make sure the card number hasn't been used anywhere in PayPal. Use http://www.fakenamegenerator.com/ to get a fresh card number.
paypal provides a list of creditcard numbers for testing purposes
https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm

How can I get credit card CVV in PayPal test account?

It looks like PayPal was purblind on this. After I create a test account with a credit card, PayPal provide everything but not CVV for a card. So it is not possible to test credit card payments, because PayPal requires CVV when payment is conducted with a credit card.
How may I get CVV?
You can use any CVV code on Sanbox credit cards :)
So just type in something like 997 and you're good to go.
It also stands true for expiry date, just set some date in the future.
More info can be found here: https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
You can go to http://www.getcreditcardnumbers.com/ to generate fake credit card numbers for testing purposes. And You can use any Expiry date (in the future) and any numeric CCV (123 works).
I got the url above from PayPal's tech support.
Or you can follow below url https://developer.paypal.com/webapps/developer/docs/classic/payflow/integration-guide/
And search for cvv as well as credit card to get valid cvv and credit card numbers for paypal sandbox(test) account. Hope this help you.
The current answers are no longer true.
The latest documentation on this can be found here
It says:
Because test credit cards don't include a card verification code (CVV), you can use 123 as the CVV for Visa, MasterCard, Discover and Diners Club or 1234 as the CVV for American Express.
Use only those else the payment gets rejected.
To add a CVV number for your buyer sandbox account. You need to log in to your Buyer account. https://www.sandbox.paypal.com
After logging in you just need to scroll down a bit and to your left you will get the Heading "Banks & Cards" (For me a Visa Card was already made there as I selected card type as visa while making my buyer sandbox account in the developer dashboard.). You may even create/link a new dummy card here.
Just click on the card and then click on edit. This will let you add any random CVV number to that card. Then you can use this to test payment between your merchant and buyer sandbox accounts.

Paypal Sandbox Credit Card in Use Error Message

Within Paypal Sandbox, when I try to add a credit card to the buyers account, I keep getting the error message "That card number is already assigned to another PayPal account." I don't get it, since Paypal just generated the number for me when I made the test account. What am I not getting here? How do I fix this?
You need to use another fake-but-valid credit card number. The ones of PP_MTS_Chad does not work for me but there are services out there - for example http://www.getcreditcardnumbers.com/ - which can help you to generate a new fake-but-valid credit card number.
Have you tried refreshing the page and generating a different credit card number? If that doesn't work, below are some test Visa credit card numbers that should work.
Visa
4024007100084663
4532097039922088
4684431180691661
4532281047529784
4485709869935124
4532455118197917
4532751738631248
4024007151460556
4485191830561711
4024007120680144
MasterCard
5298938631492858
5366456971629085
5280019641034996
5332799760390380
5457222336826489
5367034163101350
5359283541706691
5489595916141912
5140323874680289
5246932992053568

How to create preconfigured fake debit card, for testing paying without paypal's account in sandbox?

I dont want to put real visa card information for testing paying in sandbox.
Is any way to create preconfigured card for testing?
Any Visa card adhering to the Luhn algorithm will work.
However, there are a few things to consider.
If 'Negative Review' is enabled on the Sandbox test account, using a certain amount, CVV code or expiry date can trigger a decline. 'Negative review' is intended to test error scenario's, and depends on you setting a certain CVV code or amount in order to trigger an error response. To avoid this, I would recommend always using a CVV code of '000', which will always succeed.
Not all card types are supported in Sandbox. E.g. Amex may be troublesome. It's best to test with Visa.
PayPal Sandbox doesn't connect to any processors, and as such there is no actual card validation taking place. Any expiry date in combination with any card number (providing the card type is acceptable) and any CVV code will work.
For example the following card numbers would be great to test with;
Card type: VISA
Expiry date (all cards): any date in the future. E.g. 05/2018
CVV code (all cards): 000
Any Visa card number from http://www.darkcoding.net/credit-card-numbers/
There are plenty of test credit card numbers to use. No need to use a real one.