1

I am using paypal button.Code is

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="encrypted" value="test">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

How can I test this with test card number.I tried

MasterCard:5555555555554444

MasterCard:5105105105105100

Visa:4111111111111111

Visa:4012888888881881

But shows error "The card you entered cannot be used for this payment. Please enter a different credit or debit card number."

Advitha
  • 27
  • 1
  • 7

2 Answers2

0

Use the PayPal Sandbox

PayPal provides two environments that support calls to their API operations:

Sandbox environment

The Sandbox is a virtual testing environment where you utilize fictitious user accounts to make calls to the PayPal operations without affecting any real PayPal users or their live PayPal accounts.

Production environment

The Production environment is the live environment where the PayPal operation calls you make affect the accounts of real PayPal users.

Community
  • 1
  • 1
Dave Anderson
  • 11,836
  • 3
  • 58
  • 79
  • 1
    I tried this.But shows error "Your credit card cannot be used because we cannot verify the 3-digit verification number for your card. This number is a 3-digit number printed on the back of your card. It appears after and to the right of your credit card number. Please check the number you entered and try using this card again, or enter a different card." – Advitha Dec 07 '12 at 10:03
  • @Advitha this is also called the CSV number and should be listed with the test card numbers you got and submitted with the card number and card name. – Dave Anderson Dec 08 '12 at 08:52
-5

Use a real credit, debit or gift card number. After the transaction clears, simply use the Paypal control panel to return the money. Paypal knows all the attempted tricks like using the test credit card numbers you cited. You should regard this as a successful test that Paypal is well-programmed to protect your client from fraudulent charges.

Besides, is testing with a 'test' credit card number a real test? I would submit that trying to test with a widely known (how did you find out about it?) fake credit card number is not a real test - the whole idea is to collect real money for the client, therefor testing with no real money involved is not a real test. Try what I've illustrated above, and you've also tested and confirmed the capability to return real money as well as to collect it.

That would be a test that you and your client could put some real faith in.... as opposed to a test that only proves Paypal will or will not thwart an attempted transaction with an obviously phony credit card number. The card numbers you cite are meant as test numbers to test that your mod-10 check digit checksum is working correctly (when you are writing your own credit card processing sfwr), not that you can actually process all or part of a transaction on Paypal.

Ron Robinson
  • 558
  • 1
  • 3
  • 8