Does PayPal always return a payer_id? - paypal

I understand that when the customer logs into PayPal and uses their PayPal account, PayPal will send us the customer’s payer_id. But what happens if the customer does not log into PayPal and just uses a credit card to process the payment? Does PayPal still supply a payer_id in that case? And is there any way to fake that in the Sandbox? Does PayPal supply test credit card numbers? One for Success, and others for various types of failure?
(This is PayPal Website Payments Standard.)

The answer I received from the PayPal developer forums was:
A payer_id is returned whether the
buyer pays with a PayPal account or
uses their credit card without logging
into an account.
You can generate test card number in
the sandbox by following the steps
below:
First login to your buyer sandbox
account and generate a test credit
card by following the steps below:
Click on Profile
Click on Credit card
Click on Add
Select the card type (currently, the
sandbox will generate test visa card
numbers)
Copy the card here and click on cancel
** Don't add the card to your account**
Now use this test card number, any
expiration date in the future, 000 for
the CVV2 number, any address in a
valid format and any name to test
again.
These test cards will result in a
success. For website payments
standard, to simulate failure with a
test card number, you can enter any
random 16 digits for the card number.
However, with website payments
standard, if a transaction fails, no
response is sent to the merchant.
Thanks.

Related

PayPal Credit/Debit Card details to save in Db

I am using PayPal smart buttons for Payment processing, where users can pay using PayPal account or Credit/debit card.
I want to save the last four digits of Credit/Debit card entered by the user for payment in the database.
How can I get that Credit/Debit card number?
Thanks in advance.
You cannot get that information. You also cannot get information on whether or not a credit/debit card was used to pay -- some other payment method may have been used to pay. A customer's billing information is kept private to their PayPal account. All you know is that you received a PayPal payment, and this is by design.

PayPal REST SDK - how to validate credit card accounts

I was able to implement credit card payments on my website. Now my problem is how do I identify if the credit card account is fake or a fraud. What I am doing is I store the credit card info using the vault api then I get those stored accounts for the user to choose what card they will use to purchase my product. However, i can't find a way to add some more validation on how to check if the user is the real user of that credit card account. Right now I can enter any credit card number by just using a card number generator and it directly submits the payment. I can see in my sandbox merchant account that the payment was successful.
So is there a way for me to prevent this?
Thanks to those who could help.
Processing a zero value payment authorization request is the most common way to authenticate the card details are valid without actually taking payment.

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 payment buttons - how do I test paying without paypal account?

I have a website which has a Paypal payment button. When this button is pressed it takes the user to paypal to conduct the payment and gives the user a choice of either logging into their paypal account or just entering their credit card details.
I'm trying to test the latter option but I'm not sure what credit card details I need to provide in the Sandbox to allow me to submit a valid Credit card with valid expiry date and CVC code
Use a credit card generator site to generate a test number. I like this site. Any expiration date and security code will work as long as it's not passed the date, of course.

Test paypal in sandbox, making a paypal (not credit card) payment from an account with no credit

I would like to test what happens when a payment is made from an account with no credit. I am using the paypal payment method; not a credit card payment.
The advice I have found suggests changing the amount value to 107.55
and activate the Negative Testing in my sandbox account, but that is only working with credit card payment methods.
Is there a way to handle the equivalent error with paypal payment method?
you can negative test PayPal Express checkout amount error's; here is a doc on error testing this: enter link description here
Now as far as account related errors you cannot negative test if that's what your looking for as shown in this doc