PayPal classical API with reoccuring payment in Laravel 4.2 - php

I am working on Laravel 4.2 project. The project is about to provide the Video services to the dedicated customers.
The client wants to use PayPal payment gateway and I have never done this before. He has provided me a Personal and a Business account with Classical API credentials and signature.
The project requirement is once user sign-up, he will be charged certain amount (let us say $10 every month). For payment he must NOT be redirected to PayPal site that means everything should be done using my website only. Also we will NOT store any credit card details of the user and still the Payment should be done OR renewed automatically every month.
If user wants to turn of the the auto renewal of payment, he can.
I am not sure how to do this using PayPal classical API. Although I have downloaded the Omnipay/Omnipay package from git-hub, they asks there is no method to store the user's credit card details in PayPal Vault using this also to have a cron job for auto renewal. Since I don't want to store the credit card details, I am not sure how to do all this.
Please help me or guide me to do so. Is there any sample or example?

In order to take credit cards directly like you're asking you'll need to sign up with PayPal Payments Pro, which is $30/mo. Then you'll need to add the recurring billing feature to that, which is another $30/mo.
If that's not a problem, then after getting those things approved and active on your account, you would use the CreateRecurringPaymentsProfile API to create the subscription profiles.
This PayPal PHP SDK is available on Packagist and works with Composer, so it works wonderfully in Laravel.
The CreateRecurringPaymentsProfile sample is functional as-is (although, as I look at it now you'll need to update the expiration date of the credit card) so you would just need to replace all of the static data with your own dynamic data.
The template file is the same thing but it's completely empty and ready for you to populate with your own data.
Using that SDK you can have the profile creation working within minutes, so it's just a matter of having Pro w/ Recurring Payments enabled on your account.

Related

Accept PayPal payment using only credit card with Omnipay (PHP)

I integrated OmniPay in my project few days ago, and I wondered if there is any option coming with it to actually enable credit card payments.
https://github.com/thephpleague/omnipay
I want to understand how to enable the PayPal credit card payments (which do not require an paypal account) using it.
What PayPal API settings should I enable?
How can I code this?
Is there any option to do this using PayPal & PHP at all ?
I tried to document myself on this and I couldn't find any answer to this question. Neither on the https://github.com/thephpleague/omnipay nor on Stack.
The setting mentioned in comments, 'PayPal Account Optional' exists so you have the ability to only accept payments from people with an account (when set to 'No').
If set to 'Yes', payments without an account can be possible. But whether the option will be offered to a particular payer in a particular PayPal checkout attempt depends on very many factors, which you do not control.
The only way to have some guarantee of a guest method being offered is to show a credit card form on your own site, before the buyer reaches a PayPal.com page, using the black 'Debit or Credit Card' button that is part of the JS SDK. You can see an example demo here: https://developer.paypal.com/demo/checkout/#/pattern/server
That JS code used for payer approval can be paired with any backend to create and capture the order via API -- including Omnipay, which essentially acts as a proxy for the PayPal API. This JS replaces any redirect over to PayPal which you might be familiar with from oler legacy integrations; the JS SDK is a more modern way to get the payer's approval, via a small in-context window or open a credit card form iframe instead which is a better UX than redirecting away anyway.

Can one Create Auto Orders using PayPal payments api - where tokenised payments are initiated from website not using paypal repeat purchases?

We currently have a website that uses eWay token payments and setup Auto Order for customers. They can manage what items are in the auto orders and at what frequency the orders will be placed.
After the first order we can save the users 'Token' with eWay and charge their card at each instance.
We would like to add in the ability to pay with PayPal, but cannot see a similar feature where future orders can be placed without the user interacting.
The issue is that the price may differ from original payment, as discounts for the item may change or the user could add in other products to the auto order. So we don't want to have a repeat purchase setup in PayPal, rather automatically charge the users account when needed.
Been looking through paypal API docs and nothing is jumping out as the correct way to proceed.
We have tried payments through eWay to PayPal however they are not supporting paypal through their gateway anymore so are not much help.
Our website is PHP, Mysql driven and we currently use PayPalExpress checkout API for single orders.
For PayPal, the receiving account needs a feature called "reference transactions". This is not enabled by default in the live environment (though it is in sandbox). It requires business approval, so the PayPal account owner should contact PayPal's general customer support or an account manager (note: not technical support) to discuss the business need for the feature.
Once approved for the "reference transactions" feature on a live business account, PayPal can guide you on which API to best integrate to make use of this. Something like v2 or v3 vault and that API's payment tokens are a possibility that sounds exactly what you are describing, though there are other (older/legacy) APIs that use something called a "billing agreement" as what's effectively a token as well.

How to enable future payments at the latest paypal checkout

I need a flow where I can login once to my web application with paypal to save it as a payment method, and I can process the payments every time the user clicks the purchase button without having to login at every purchase.
https://developer.paypal.com/docs/checkout/ , paypal support provided me the following section but I can't find the flow I require.
Additional information:
I plan to use laravel so I don't know if I would need the paypal php SDK.
and in the front VueJS
For Future Payments, also called Reference Transactions, the business owner of the PayPal account should contact their PayPal account manager or PayPal's general business support via https://www.paypal.com/smarthelp/contact-us , to explain the business need for the feature

What PayPal PHP-API functions to use as replacement for subscription-buttons?

I have a website coded in PHP that uses paypal buttons/IPN for subscriptions.
The method is limited and I need to replace it with the REST-API.
What the system needs to do:
Accept new user recurring-payment subscriptions
Be able to change plan pricing for new users
Be able to change plan pricing for existing users
Change subscription plans mid-subscription(If a user upgrades from pro to master the price goes up, and the opposite way it goes down).
The price difference between packages is 5$
Give periodic discounts for a limited amount of months.
The questions:
1.) What is the equivalent of recurring-payments in the PHP-API or REST-API? (I'd rather it auto-charges and notifies my IPN if possible)
2.) How can I automatically refund/charge an additional amount when the user upgrades/downgrades in the middle of a month?
3.) Is there a standalone PHP control-panel that can connect to the paypal API to manage the subscription packages + sales?
Thanks in advance!
If you are looking to use REST APIs, the best place to start is going to be at the REST API docs. For your situation, you can use the vault to set up a recurring payment system. You could also use the future payments API, but you will need to make sure you buy DPRP for your account. Contact PayPal Customer Support to enable DPRP.
With the Vault API, you can just create one time payments over and over with the token you get when storing a credit card.
There is an in-depth walkthrough using the SDK on the PayPal PHP SDK Wiki.
To do refunds, you can use the Refund REST API. All this assuming that you would be writing scripts to detect your user downgrading/upgrading. You would just need to store the amount they are paying each month in your DB.
There are some shopping carts out there that are implementing REST APIs. You might need to google search for something like that.
Hope that helps and gets you started in the right direction!

Paypal / Google checkout integration

Is it possible to integrate the Google Checkout API or Paypal API with my marketplace? I am using PHP to generate the market, one auction at the time. I have a MySQL database containing all of the market actions, however, I was wondering. Can I use either Google Checkout or Paypal to dynamically generate the Checkout process, and give the proceeded money to the user whose posted action, then notify me?
I am able to load User details from the MySQL database aswell.
I looked at the 'StackExchange' network, however; I could not figure out where to place this question. Therefore I assumed this was the best place ?
Google Checkout as the term implies is pretty much what it says - it allows a merchant to outsource their checkout operations to Google. I don't think it's a fit because in your case, "merchant" is "dynamic" - its different sellers across auctions. Additionally, Google Checkout isn't for person-to-person payments - its specifically for a merchant (store) to sell products and service at it's web site and have the checkout process handled by Google.
Look into Paypal Adaptive Payments.
You can also look into Amazon FPS .
I'm not familiar with your project's terms such as 'generate the market', 'market actions'
PayPal has reference tranactions in which you can charge same customer's credit card again without storing actual credit card.
Authorize.Net has CustomerPaymentProfile in which they store your customers's credit cards. Then you can submit each customer's paymanet profile, and they'll charge the card for you.
I'm not familiar with Google's automatic checkout without actual credit card.

Categories