PayPal Credit/Debit Card details to save in Db - paypal

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.

Related

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.

Paypal credit card processing without leaving my site?

Is there a way to have paypal process my credit cards in the background without having the user to leave my site or have a paypal account?
Or is this feature only for "Pro" accounts?
Thanks.
This is available for normal Account also.
The Direct Payment User Experience
Direct Payment enables buyers to pay by credit or debit card during your checkout flow. You have complete control over the experience; however, you must consider PCI compliance.
When buyers choose to pay with a credit or debit card, they enter their card number and other information on your website. After they confirm their order and click Pay, you complete the order in the background by invoking the DoDirectPayment API operation. Buyers never leave your site. Although PayPal processes the order, buyers aren't aware of PayPal's involvement; PayPal will not even appear on the buyer's credit card statement for the transaction.
The following diagram shows a typical Direct Payment flow:
Direct Payment Flow
Direct Payment Paypall without leaving Site

PayPal Credit Card store API why does not need security Pin?

PayPal Vault store the credit card and return cardId which we can later use to call Payment API.
I am not sure when how does payment get approve since while storing the card or making payment we no where we used security pin of Credit Card.
1.Can any one please explain me how does payment work just with creditcardId given by PayPal ?
2.I want payment to get credited to specific merchant account , I dont see merchantId as parameter to payment API , is payment to specific PayPal merchant possible using stored credit card ?
awaiting for clarification , Thanks !

paypal website standard for subscription, cancelling subscription

Please help me with my requirement to implement using paypal.
My requirement is this :
The user can subscribe to a service, using paypal account or credit card ( without paypal account ) . The user can unsubscribe later if he/she wishes to .
I implemented the first part using Subscription button of "website standard" where paypal gave me a button and upon clicking it will lead to paypal website.
I am getting the notifications using IPN
Now there are two problems:
How to test credit card, I could test paypal account payment using the sandbox test users, but for the credit card, I dont have dummy credit cards. If I use the credit cards of the paypal accounts, it says "paypal users should use paypal to pay "
I want to cancel the subscription. The paypal user can go to the paypal account and cancel the subscription. That works fine. But how can we cancel the subscription from my website, or how can we cancel the subscription of the creditcard payer. The paypal SDK says the subscription profile ID is invalid.
Did anyone tried this kind of implementation.
Any help would do, be it links or places to search .
Thanks a lot
First, Guest Checkout (paying with a credit card without signing into PayPal) is only available without recurring payments. When using recurring payments it will force the person to create a PayPal account. You would need to use Payments Pro in order to do recurring payments directly with credit cards, and then the person would never even be redirected over to PayPal at all.
For test cards, any old expired card you have would work, or what you can do is login to your PayPal sandbox account, go into the profile, and go through the process to add a new credit card to the account. It will actually fill in a card number for you, but DO NOT add this card to the account. Just copy that card number and then cancel out of this screen. Now you can use that card number for testing on the PayPal system.
In order to refund using the API you'll need to create the profiles using the CreateRecurringPaymentsProfile API. The profile ID that gives you will be compatible with all API calls to manage it in the future.

Does PayPal always return a payer_id?

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.