Paypal REST-API Preapproved Payment Scenario - php

I would like to implement this scenario via Paypal REST API
Client creates an Billing Agreement
Approves it and goes back to the our website
There he will fill out some data and press "Finish and pay"
Then a request via API will be done, so the payment will be processed.
I already created the agreement with setAutoBillAmount("no").
So the client will not be charged immediatelly.
But i cannot find a call in the api docs
http://paypal.github.io/PayPal-PHP-SDK/sample/#billing
where i can make a call to API to charge the client according to the Preapproved payment he made.
Can someone point me to the right direction?
thx

If you want to use pre approved payment in PayPal then I would recommend you to use suggest Pre-approval API. You can use PayPal REST for Recurring Billing but it does not have a feature of Pre-approval yet.

Related

Paypal Payment REST API and CreditCard Payment

Recently I visited Paypal Rest API page https://developer.paypal.com/docs/integration/direct/payments/. I noticed an IMPORTANT message there please find below screenshot:
If this API now restrict to process Card Payment then Is Billing Plan and Agreement API (for Recurring/Subscription Payment) also restrict Card payment?
Please help me
The ability to process direct credit card transactions via PayPal REST API for new integrations has been restricted. That means that the "payment_method":"credit_card" option is no longer allowed to be use with any new REST API integrations, including for the Billing Plan and Billing Agreement API's.
We apologize for any inconvenience.

PayPal API - Payments Pro Required To Process Billing Methods Directly?

It is my intention to integrate payment processing/subscription billing plans into a site using PHP and Javascript. I'd like to use PayPal to process credit/debit and PayPal charges. I read an article that said (Paraphrasing)
Normally you have to forward users to PayPal where they input their
billing information. PayPal Payments Pro allows you to process billing
info directly from your site.
I've also seen information to the contrary. This answer for instance. Also, the PayPal API docs don't say anything about needing Payments Pro to process a card directly from my site. Here you can see a card being processed without sending the user to PayPal under "Create billing agreement (credit card)."
I have a PayPal business account. I was able to generate a PayPal API Signature (API creds). Can I use the code shown in that quick start to process payment methods without applying for Payments Pro? I'm not talking about IPN. I know that anyone can use that.

PayPal Sandbox | Express checkout allow credit card payments

First of all a want to mention that I am very new in PayPal at all.
I have create a plugin for WordPress, that is useful for booking a taxi for a trip. The plugin, it has it's own cart, that allowing the client to add several services in the cart and then to check out via PayPal.
As I mentioned earlier I am new, to PayPal, so I have download the PHP SDK provided by the PayPal, and I have complete the first step of the payment process. I have got the Token, and then redirect my client to PayPal web site to perform the payment.
The problem is that, in PayPal web site I have only the options "Have a PayPal account?" and "Create a PayPal account". What I like to ask, is how can I use the credit card payment instead of the "Create a PayPal account" ? Is there any way ?
Any idea please ?
You may want to try using Stripe. http://www.stripe.com/ super-easy, and has excellent documentation. I have used it alongside Paypal express checkout.
Paypal now required paypal account to get payment when you use express checkout api, to get payment from paypal use credit card reference api or any other api suit your need from paypal

Paypal integration on website

My need: I want users to click on button and goes to paypal, where they can login or add the credit card details and payment should be get done. In short, I don't want to store credit card info on my website.
I found 'Express Checkout' is a suitable paypal method for the same. Am I right?
Does this method requires return urls on https only or can work with simple urls?
Can anyone help me with tutorial or something for the same?
Thanks for all of your support.
Here is an excellent PHP Class for PayPal IPN I've used countless times, which doesn't require user registration: http://www.micahcarrick.com/php-paypal-ipn-integration-class.html
Incidentally, IPN lets you set a return URL via PayPal, though with that class you can send a return URL to IPN before the user pays.
If you want a tutorial or more help though you'll need to tell us which language you're using.
The easiest and most flexible solution that comes without a monthly fee, and is available globally, is PayPal Express Checkout. Express Checkout does not require a https return/cancel URL.
Here is how it works:
Express Checkout is based on three API calls; SetExpressCheckout, GetExpressCheckoutDetails and DoExpressCheckoutPayment.
SetExpressCheckout sets up the payment and returns a token.
You redirect the buyer to https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKEN-HERE, where TOKEN-HERE is the token you received earlier
After the buyer has agreed to the payment, he is returned back to your site.
You can call GetExpressCheckoutDetails and supply the token as a parameter to get the PAYERID of the buyer.
Call DoExpressCheckoutPayment with the token and PAYERID supplied to finalize the payment
Note: If you want to force the 'card details' screen to be displayed initially, and allow buyers to pay without having a PayPal account, ensure you're setting SOLUTIONTYPE to 'Sole' and LANDINGPAGE to 'Billing' in your SetExpressCheckout API request.
In addition, the 'PayPal Account Optional' setting must be switched to 'On' inside the Payment Receiving Preferences of your PayPal Profile.
You can find additional documentation for Express Checkout at https://www.x.com/community/ppx/documentation#ec as well as the SDK's and sample code at https://www.x.com/community/ppx/sdks#NVP

php paypal integration

I want to return the invoice generated after a PayPal payment on my website. How do I get the PayPal invoice generated after this payment is made?
Your question is not 100% clear. PayPal already sends an invoice (you can customize this from your PayPal account) upon payment completion.
What you can do on your side is to handle payment confirmation using PDT or IPN. I would recommend the second one since is more reliable. Once you get the payment confirmation through IPN you can send to customer your own generated invoice based on the order data.
If you are interested to easily integrate your custom shopping cart with PayPal please read this article.
You can get every information from PayPal using PayPal API.

Categories