What is the easiest way to set up payment buttons in PHP? And how do I do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't seem to find any working examples for payment buttons in PHP. All of the examples in the button configuration page are in NodeJS, and there's no mention of buttons in the official PHP SDK so I'm assuming it's a lower-level SDK.
I only sell three things with fixed prices and all I need is the standard three PayPal/Venmo/cards buttons that are displayed in the checkout integration page. Scratch that; I'll be happy if I can get just one of those to work.
Thanks in advance for any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even if you're using PHP to make the API calls to PayPal, you still use the JS SDK to display the buttons on the site.
You just add the JS SDK to your script, use it and optional parameters to display buttons accordingly, and then you can use your PHP stuff to make the actual CreateOrder, CaptureOrder, and any other API calls you want.
Details are covered here: https://developer.paypal.com/docs/checkout/standard/integrate/
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My issue is that the process of dealing with the payment once made is not documented anywhere. Passing parameters through to a completion page and updating a database as causing me no end of problems.
To be frank the official documentation is written by experts and the old fashioned example code where you could update with your own informaiton, test and go is sorely lacking. Especially for a php based enviornment which PayPal appear to be trying to kill off.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Payment Link Payment Button Custom Payments in PayPal Payments Standard
- Need help with copy/paste PayPal Button script not working in SDKs
- Using Sandbox credentials at checkout loops PayPal to sign up page in Sandbox Environment
- How do I handle INSTRUMENT_DECLINED error? in REST APIs
- How do I set up auto return with advanced checkout in PayPal Upgrade Community