Paypal integration in php by storing user credentials - paypal

I tried to integrate paypal in my website and I was able to implement it . I tested the transcations with sandbox account provided by paypal. For each transaction, buyer need to enter his credit card details or other paypal account informations. So I would like to store the user credentials in my database and then at the time of transaction, make the buyer proceed with transaction without entering details again. Can you please suggest if there is any possibility for implementing this or any suggestions to do so? All suggestions are welcome.

You wouldn't store the buyer's PayPal credentials (because that's about the worst crime you can commit in internet security), but you can create a billing agreement with the buyer. The billing agreement would allow you to charge the buyer, at a later date, without having to send the buyer to PayPal again to approve the payment. This page tells you how to do it: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Related

Is it possible to transfer money from one paypal account to another without touching my paypal account, but I get notified when the payment happened?

Is it possible to transfer money from one PayPal account to another without touching my paypal account, but I get notified when the payment happened?
scenario:
Seller on my website uploads product
Buyer comes on the website and purchase
If Seller receives the amount from buyer
Me (the websites unlock product for download (money dosen't touch the websites account)
coding Language dosen't really matter, if not possible is it possible to a business account with automated payout to the seller?
Use PayPal Checkout with a server backend
Specify a payee object in the purchase_unit: https://developer.paypal.com/docs/checkout/integration-features/pay-another-account/

Paying automatically from PayPal

I need to know if the following scenario can be developed.
I have a website where the mode of payment is pay-by-usage. So when the customer exceeds a particular amount, I need to charge his PayPal account automatically. Is this possible in the PayPal API?
You can use PayPal Adaptive payment and there is an option to charge user account automatically. It is called PayPal Pre Approval payment.
In the first phase the user has to authorize your app to perform payment onbehalf of user. During this authorization step, you will get and authorize pre approval key. Later you could automatically charge user PayPal account using this key.

Use PayPal From Website Form

Requirements state that I build a form that collects user's PayPal login info and charges the user's PayPal account a fixed price without having the user leave the website.
I am beginning to think this is not possible. Can someone kindly suggest a solution that comes close to meeting the requirements? I am not certain what's possible and what's not possible with PayPal.
There isn't a solution for what you are trying to do. In order for the buyer to login and pay with PayPal, they would have to leave your site and go to the PayPal login page. You could set up a billing agreement so that they only have to log into PayPal once. With a billing agreement, you would be able to charge the buyer's PayPal account when you are needing to. You would just need to have the buyer go through the flow initially and get sent over to PayPal to login and agreen to the billing agreement. Then when you want to charge them again in the future, you would just need to reference the billing agreement id.
The closest solution to having the user pay without leaving the website is PayPal digital goods express checkout.
Here is an example to show you how it works:
http://jmsliu.com/1307/integrate-paypal-digital-goods-express-checkout-into-website.html

Paypal refunding a split transaction

I have built the paypal's parallel payment option into my website. Here a % goes into my website paypal account and remaining goes into one of the merchant's paypal account. When i need to issue refunds, how can i make it work where both my portion and merchants portion are refunded automatically? I tried the paypal refund APIs but it only works for my portion, but for the merchants portion it says i dont have permission.
You would need to have the other merchant's that you are splitting the payment with, grant API permissions to your API to be able to issue refunds. Otherwise, you would not be able to issue refunds from their account with your credentials.

How to check Payment failure for Paypal Express Checkout

We are using Paypal recurring billing service (using Express Checkout) at our website for monthly subscription.
Since we have an Australian account so we are not able use the DPRP (Direct Payment Recurring Payment) service offered by Paypal because it seems, DPRP service is limited
to only few countries (US, UK and Canada).
In Express checkout payment details are received at Paypal Website. So we do not have any information, whether the payment failed, user pressed the Back button in browser or He/She intentionally clicked the cancel payment.
After speaking to Paypal support team we get know that there could be multiple possible reason for Payment failure, and seller has to contact Paypal by themself. So we can
not provide any troubleshooting for that at our website.
So we want to know, Is there any possible solution to avoid this or atleast can we diffrentiate between the user for whom payment failed and who intentionally moved to
our website back without doing payment because this way we are not only unable to followup with them but also loosing a part of the customer base, interested in our service.
Any help in this is Appreciated.
Thanks
You should implement the Pay Pal IPN (Instant Payment Notification).
You configure the IPN url address on your PayPal merchant account settings. This page is simple HTML page with server-side programming that is listening for requests coming from PayPal.
There's no need to do something extra in the checkout process for making IPN work. Once you set this up, it will automatically work.
Every time something happens with a transaction in your merchant account, e.g. transaction completed/failed/canceled, PayPal will send an HTTP Post to your IPN listener URL.
Here you can get all the relevant information about the transaction, like the payer ID, the payment status. With this information you can decide what to do with your customer's order.