Sample test credit cards(Fraud or declined, Visa, Master, Amex) for testing in our application

KiranOnapakala
Contributor
Contributor

Hi,

 

We integrated paypal service in our application. If we send proper credit card information, we are getting success (Result 0) for every credit card for ex. 411111111111111, 42222222222222 etc. For these cards we are getting Vault ID and everything is works fine.

I need some Fraud or declined Credit Card numbers for testing, which should return other than (Result 0), so that we can implement the code for negative testing.

 

Application technology: .Net Core.

Host Address: pilot-payflowpro.paypal.com

HostPort: 443

User: *******

vendor: *****

Partner: PayPal

Password: *****

Login to Me Too
5 REPLIES 5

angelleye
Advisor
Advisor

Check the PayFlow Developer Guide.  On page 50 there is a section for "Testing Result Values in Responses" that explains how to get specific result codes to come back based on the amount you send in the request.

 

 

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

KiranOnapakala
Contributor
Contributor

Hi Angelleye,

 

Thanks for the quick response, I have checked the document page 50. It specify about result generate after amount submit but i need a test credit card to get the Vault ID's. In paypal you have Vault API concept which you can store user card information and give the pnref number (vault ID) as a response. This Paypal vault we have implemented in our application and its working as expected for any Credit Card for ex(411111111111111, 42222222222222 etc). But i need some sample credit cards which should return other than Result =0 (Accepted) for negative testing in our application.

 

For referece of PayPal Vault: https://developer.paypal.com/docs/api/vault/v1/

Login to Me Too

angelleye
Advisor
Advisor

I'm familiar with the vault.  My answer doesn't change, though.  You are asking how to produce a Result code other than 0, and the section of documentation I mentioned to you explains how to do that.  Not sure where I've lost ya..??

 

 

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Login to Me Too

KiranOnapakala
Contributor
Contributor

1. In my application we have 3 pages, 2nd page we have provided the credit card saving (all the card information like CC number, cvv, expiry date, address info) facility to the user. 

2. Now it will hit the paypal service vault api and get the pnref number (vault id), this vault id we are saving in our database table.

3. On the above step  we are only talking about the saving card information with you and getting the vault id. (we have not reached till payment stuff).

4. Then we use the user vault id and send the transaction to you for authorization and payment(page 3).

 

5. I am talking about the 3rd step which says, you save the card info in vault and get response pnref. If the user card info is correct, it will generate the (Response=0 means accepted) and also provides pnref (vault id). This works flow is working fine to me.

6. What i need now: I need some sample credit cards where it should not generate the Response=0 (Accepted) when i send the Fraud/declined card info for my negative testing from my application. If any credit card number is Fraud/Decline, for sure you might return some other response back for ex: (

Status:170 , RespMsg:Fraudulent activity detected: Excessive use of a credit card.;). This one we got it from one of the test card (4111111111111111) after excessive usage when you block this card. But this card is activated  again(working fine) after couple of hours. Like this if you have any Visa/Master/Amex Fraud/Declined sample test cards which return other then Response 0 (accepted), please provide to me.

 

7. I think, this time i am clear about my question. Please provide sample card for negative testing for Visa, Master , Amex.

8. we have not reach till Payment, i need info till saving the card with you.

 

Login to Me Too

angelleye
Advisor
Advisor

I mean...I'm sorry, but I still don't see why you can't do what the documentation says.

 

You still have a standard checkout in place in here.  The person is entering their card details into a form, you send that to PayPal, and you get a result back.  Whether or not you're processing the payment immediately as a Sale at that point, or saving it in the Vault for processing later doesn't really matter.  You're going to get a 0 or something else back, and your app can handle that result accordingly.

 

So if you are wanting to run tests where the card getting saved to the vault fails, then you could run that through the API with the specific amounts set to return a specific result code, and then troubleshoot and build out your handling of that however you need to.  

 

Then, knowing that your error handling is working as expected, you can rest assured it will handle that response correctly regardless of whether or not you did an immediate Sale or a Vault transaction.

 

Maybe I'm just missing your point.  Not sure how else you can explain it, though.  It seems pretty clear...but I feel like my answer is clear, too, so...that's the best I can give ya.  Sorry.

 

 

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
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.