paypal-rest-sdk

PayPal Orders V2 payee object in Checkout-PHP-SDK fails with amount error

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 13:41:21
问题 I am integrating PayPal Checkout which works nicely unless I include a custom payee in the order body. I tried the PayPal PHP example at https://developer.paypal.com/docs/checkout/integration-features/custom-payee/ that looks like this: return array( 'intent' => 'AUTHORIZE', 'purchase_units' => array( 0 => array( 'amount' => array( 'currency_code' => 'USD', 'value' => '220.00' ) ), array( 'payee' => array( 'email_address' => 'payee@email.com' ) ) ) ); Trying to create an order will lead to

PayPal REST API not returning recurring payment information in laraval

六眼飞鱼酱① 提交于 2021-01-29 09:56:18
问题 I am working on Paypal webhook (subscription) section to insert recurring payment information into the database. I have done coding based on the link "https://jslim.net/blog/2018/01/22/PayPal-Rest-API-with-Laravel-5-and-Angular/" but Paypal webhook always return “payment_status: Pending” on sandbox image and its not inserting recurring payment information into the database (insert option added in PayPalController - function webhooksPaymentSaleCompleted ). I think the problems related with

How to cancel the Paypal Billing Agreement using REST API with PHP code

吃可爱长大的小学妹 提交于 2021-01-27 06:52:42
问题 We have implemented "Billing Plan & Agreements" in our website as explained on http://paypal.github.io/PayPal-PHP-SDK/sample/. We have implemented weekly recurring payment and just want to cancel the billing agreement through the API. 回答1: You need to create a object of Agreement & AgreementStateDescriptor and using object of Agreement call the cancel() method. Below is the code example using PHP. $agreementId = "I-ABACAGAH"; $agreement = new Agreement(); $agreement->setId($agreementId);

PayPal Checkout: Is it safe to receive a payment with only client-side code?

不打扰是莪最后的温柔 提交于 2021-01-19 09:39:21
问题 I'm using the PayPal API to put payment options to my website. In the tutorial they have, they are rendering the button and setting up the transaction entirely at the client side with JavaScript. Here is the sample code: <script> paypal.Buttons({ createOrder: function(data, actions) { // This function sets up the details of the transaction, including the amount and line item details. return actions.order.create({ purchase_units: [{ amount: { value: '0.01' } }] }); }, onApprove: function(data,

PayPal Checkout: Is it safe to receive a payment with only client-side code?

有些话、适合烂在心里 提交于 2021-01-19 09:37:35
问题 I'm using the PayPal API to put payment options to my website. In the tutorial they have, they are rendering the button and setting up the transaction entirely at the client side with JavaScript. Here is the sample code: <script> paypal.Buttons({ createOrder: function(data, actions) { // This function sets up the details of the transaction, including the amount and line item details. return actions.order.create({ purchase_units: [{ amount: { value: '0.01' } }] }); }, onApprove: function(data,

Paypal React shows extra buttons after changing amount

一曲冷凌霜 提交于 2020-12-27 05:31:46
问题 WITHOUT react-paypal-button-v2 ~~~has an ovehead of 60KB Similar question here but they suggest react-paypal-button-v2 I'm Trying to make react and paypal button that changes the billing amount on props change. I call the following component with props price and every time the price change i would like to re-render the button to update the actual price. WITHOUT react-paypal-button-v2 const PaypalForm = props => { let paypalRef = useRef(); useEffect(() => { window.paypal .Buttons({ createOrder

PayPal Smart Subscribe server side

喜欢而已 提交于 2020-12-18 07:48:19
问题 hello in trying to convert my PayPal smart subscription button javascript into the server-side particularly on PHP. But I keep looking online and PayPal documentation still can't find and sources. It is similar to this PayPal demo of server-side. <div id="paypal-button-container"></div> <script src="https://www.paypal.com/sdk/js?client-id=Subscription_id&vault=true" data-sdk-integration-source="button-factory"></script> <script> paypal.Buttons({ style: { shape: 'rect', color: 'gold', layout:

Refund using PHP PayPal REST API?

余生长醉 提交于 2020-07-07 19:41:10
问题 I am working on a PHP application that integrates into PayPal's REST API. I have the transactions processing correctly and saving the transaction ID into a MySQL database. I am now trying to refund the sale but cannot get it to cease giving a "Incoming JSON request does not map to API request" error. Does anyone have any advice on how to get this working? I left some of my attempts in the code with comments about their result. I'm feeling a bit lost in the direction to get this working. Any

Refund using PHP PayPal REST API?

与世无争的帅哥 提交于 2020-07-07 19:40:48
问题 I am working on a PHP application that integrates into PayPal's REST API. I have the transactions processing correctly and saving the transaction ID into a MySQL database. I am now trying to refund the sale but cannot get it to cease giving a "Incoming JSON request does not map to API request" error. Does anyone have any advice on how to get this working? I left some of my attempts in the code with comments about their result. I'm feeling a bit lost in the direction to get this working. Any

Refund using PHP PayPal REST API?

这一生的挚爱 提交于 2020-07-07 19:38:43
问题 I am working on a PHP application that integrates into PayPal's REST API. I have the transactions processing correctly and saving the transaction ID into a MySQL database. I am now trying to refund the sale but cannot get it to cease giving a "Incoming JSON request does not map to API request" error. Does anyone have any advice on how to get this working? I left some of my attempts in the code with comments about their result. I'm feeling a bit lost in the direction to get this working. Any