PayPal-PHP-SDK | PHP SDK for PayPal RESTful APIs | REST library
kandi X-RAY | PayPal-PHP-SDK Summary
kandi X-RAY | PayPal-PHP-SDK Summary
This SDK is deprecated. You can continue to use it, but no new features or support requests will be accepted. For alternatives, please visit the current SDK homepage on the PayPal Developer Portal.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Prints the output .
- Create an object from an array
- init CredentialCredential
- Create an authorization code from an authorization code
- Get the authorization URL .
- Parse response headers
- Get property annotations
- Get user info
- Push token to cache
- Generates new access token
PayPal-PHP-SDK Key Features
PayPal-PHP-SDK Examples and Code Snippets
Community Discussions
Trending Discussions on PayPal-PHP-SDK
QUESTION
I am trying to implement a single Payout functionality in Paypal. I have referred to the sample code given by Paypal's documentation here. Everything seems to be working in order but the response given by PayPal indicates this: "batch_status": "PENDING". Here is my payout function:
...ANSWER
Answered 2021-Nov-05 at 12:23Payouts run in a batch. For a batch status to begin as 'PENDING' is normal. The status of each payout within the batch is what matters. You can query them as needed, and if they are individually pending some reason may be given.
The most common reason for a PayPal payment to be pending in sandbox or live is if there is no PayPal account with a confirmed email (in sandbox or live, respectively) at the address to which the payment was sent. Receivers have 30 days to create an account and/or confirm the email on their account to accept the payment, otherwise it will be automatically refunded after 30 days. Reminders are sent to that email during this period.
QUESTION
I am trying to implement a paypal webhook for recurring payment, but I am stuck at finding the right documentation, there is like 5 pages on paypal for webhooks. I found this one : https://developer.paypal.com/docs/api-basics/notifications/webhooks/rest/ , there is nothing about it being deprecated or something. After following the Integration steps it led me to install the paypal rest sdk. But when I open it on github it says that it is deprecated ?? https://github.com/paypal/PayPal-PHP-SDK . Does anyone know how to implement it, with non deprecated sdk ? Thanks.
...ANSWER
Answered 2021-Mar-26 at 13:02The SDKs mentioned in that guide are deprecated, direct API calls are not deprecated, and are how it should be implemented.
It's all documented on the page you linked, there is this API reference: https://developer.paypal.com/docs/api/webhooks/v1/
QUESTION
I have a Laravel website which is using PayPal's webhooks to be notified when a payment is received. This was all working fine until we a 404 error was returned from the following API endpoint:
...ANSWER
Answered 2021-Jan-28 at 14:57The general-purpose PayPal-PHP-SDK deprecated. If you need an SDK for payments, use the Checkout-PHP-SDK (for the v2/checkout/orders API)
There is no supported SDK for Webhooks, integrate directly. Webhooks use a v1 URL, there is no v2 webhooks.
v1 endpoints in general are not deprecated, unless a newer version exists
v1/payments in particular is deprecated, because v2/payments and the functionality moved to v2/checkout/orders exist
QUESTION
I'm trying to use the PayPal-PHP-SDK to integrate PayPal with a custom built WordPress eCommerce theme and I'm getting a an error:
Got Http response code 400 when accessing https://api.paypal.com/v1/payments/payment/...
This error only appears when I which to live, it works completely fine on sandbox mode.
On the client side I'm using checkout.js and redirecting it to the PHP file where I'm trying to use the the PayPal-PHP-SDK to execute the payment and I get the error where the code reads:
...ANSWER
Answered 2020-Aug-04 at 23:56Hard to guess at what precisely is wrong with the execute call without seeing the full API response body and headers, including a PayPal-Debug-ID
400 errors are usually a wrong credential problem, or credentials paired with the wrong environment, but that is less likely if your payment creation and oauth2 calls are working okay
The more important question is why are you using an deprecated V1 SDK, at all, which is no longer maintained? You should completely change your integration to the current V2 PHP SDK, documented here: https://developer.paypal.com/docs/api/rest-sdks/
The current best front-end experience to pair it with is https://developer.paypal.com/demo/checkout/#/pattern/server
QUESTION
i use laravel V6
...ANSWER
Answered 2020-Jul-26 at 04:02For that ClientId/Secret it looks like the receiving account in the PayPal sandbox is from a country that cannot receive any payments, such as Bolivia. Create a new sandbox business account at https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Faccounts%2F for a different country that is able to receive PayPal payments, and then create a REST app for this new sandbox business account in the 'My Applications' side tab.
It looks like you are using an obsolete PHP integration, with the old v1 payments SDK
You should instead use the v2 Checkout-PHP-SDK, with two routes, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/
Instead of redirecting to the approval URL, use this front-end UI: https://developer.paypal.com/demo/checkout/#/pattern/server -- this gives an "in context" checkout experience that keeps your site loaded in the background, which provides a much superior modern web experience
QUESTION
I have created single batch payout using their documentation. so that I can send money to seller.
But I don't know what I should do after it. How can I show a payment form, where user can login in PayPal and pay the amount?
This is my code in controller function
...ANSWER
Answered 2020-Jul-16 at 04:33Payouts is for sending money from your account to another account. There is no form to show or log into. You are the API caller, and payments are automatically approved as coming from your account.
If you want a form for a user to approve paying from their account to some other account, use invoicing: https://developer.paypal.com/docs/invoicing/
Alternatively, maybe you don't need an invoice form but just a regular PayPal Checkout with a 'payee' recipient set: https://developer.paypal.com/docs/checkout/integration-features/custom-payee/
QUESTION
I'm using PHP and I want to send money to users who have sold their products on my platform. For this I'm trying to use Paypal Payouts, I've found this link here with an example code for a single payout.
My problem is that, I'm not that good in PHP and I have no clue how this actually works. The latter part of the script is more or less understandable however, I'm really unsure about these lines here:
...ANSWER
Answered 2020-May-31 at 23:40The PayPal-PHP-SDK is deprecated and should not be used for any new integration.
On the list of current SDKs you will find the Payouts PHP SDK.
QUESTION
I built a PayPal API in Netbeans with a local environment server (xampp). The API worked properly in the local environment. When I upload the files to the Cpanel environment I got the following error when i type the payment button:
...ANSWER
Answered 2020-May-24 at 10:09You pretty much need to troubleshoot and solve that type of file path / file nonexistence error on your own; it's not an issue for the Stackoverflow community to remotely debug.
Moreover, the PayPal-PHP-SDK is deprecated and should not be used for any new integrations. You should be using the v2 Checkout-PHP-SDK.
QUESTION
I have worked on Paypal Payment Gateway Integration Projects in Laravel project.
I mostly used Paypal/Paypal-php-sdk
package. Here
But I came to know about srmklive/laravel-paypal
package which looks more easier. Here.
I think above two payment Apis are working slightly different. First of all, I took api keys from different places in Paypal account.
In Php-paypal-sdk
package, I got two API keys, Paypal Client ID and Paypal Secret Key.
And in srmklive/laravel-paypal
package, I got three API keys, API username, API password, API Certificate Key.
Can anyone have better knowledge about this?
...ANSWER
Answered 2020-May-09 at 12:22- The composer package
paypal/rest-api-sdk-php
uses the REST API (v1) as referenced here: https://developer.paypal.com/docs/api/overview/
However I noticed there also appear to be /v2/
endpoints, as found here: https://developer.paypal.com/docs/api/orders/v2/ . I'm not sure why this package uses the v1 version; I couldnt find much information about it.
- The package
srmklive/laravel-paypal
uses the deprecated NVP/SOAP API. According to https://developer.paypal.com/docs/archive/express-checkout/, it is deprecated since January 1, 2017.
As quoted in the readme https://github.com/srmklive/laravel-paypal:
Currently only PayPal Express Checkout API Is Supported.
So you're probably better off using the first package. However I do remember that the APIs are not interchangeable, i.e. not all functions are implemented in both APIs. I remember vaguely something about recurring payments not available in one or the other.
Another reason you'd also want to use the first package is because it is a 1st party package (created by PayPal), so it's probably more complete and closer to the source.
QUESTION
I know there are a few questions regarding PayPal Integration but I'm trying to implement PayPal Express Checkout with Smart Buttons and REST API and no success.
What I want to do is:
Create a Payment Authorization (with
payid
andorderid
)Send this
payid
to the client (javascript) to be approved.Redirect after payment to a confirmation page.
I have already created a Payment Authorization with the code bellow:
...ANSWER
Answered 2020-Apr-22 at 16:56You are looking for this front-end: https://developer.paypal.com/demo/checkout/#/pattern/server
For your backend, you should use the latest v2/orders SDK: https://github.com/paypal/Checkout-PHP-SDK
(Your v1/payments backend will work, but that SDK is deprecated and there is no reason to use it for a new integration)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PayPal-PHP-SDK
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page