paypal

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

How do I extract OrderID from this object/response & pass it to another function onApproval? (Paypal API)

白昼怎懂夜的黑 提交于 2021-02-11 12:46:59
问题 Please see this example -> https://developer.paypal.com/demo/checkout/#/pattern/client The createOrder func there returns this -> {"id":"8GS56714S6789541X","intent":"CAPTURE","status":"CREATED","purchase_units":[{"reference_id":"default","amount":{"currency_code":"USD","value":"88.44"},"payee":{"email_address":"barco.03-facilitator@gmail.com","merchant_id":"YQZCHTGHUK5P8"}}],"create_time":"2021-02-04T02:47:04Z","links":[{"href":"https://api.sandbox.paypal.com/v2/checkout/orders

How do I extract OrderID from this object/response & pass it to another function onApproval? (Paypal API)

无人久伴 提交于 2021-02-11 12:45:37
问题 Please see this example -> https://developer.paypal.com/demo/checkout/#/pattern/client The createOrder func there returns this -> {"id":"8GS56714S6789541X","intent":"CAPTURE","status":"CREATED","purchase_units":[{"reference_id":"default","amount":{"currency_code":"USD","value":"88.44"},"payee":{"email_address":"barco.03-facilitator@gmail.com","merchant_id":"YQZCHTGHUK5P8"}}],"create_time":"2021-02-04T02:47:04Z","links":[{"href":"https://api.sandbox.paypal.com/v2/checkout/orders

Paypal IPN get subscription end date (recurring)

ⅰ亾dé卋堺 提交于 2021-02-10 14:51:01
问题 I'm developing a site that has annual or monthly paypal subscription options. From the IPN data that receives, can I determine if the subscription is annual or monthly? Doesn't seem possible. At the moment it's set up just for monthly payments, so in my own db I store something along the lines of: $data = array( 'id' => $ipnData['custom'], 'subscribed' => 1, 'subscription_fee' => $ipnData['mc_amount3'], 'subscribed_until' => date("Y-m-d H:i:s",strtotime($ipnData['subscr_date'] . '+1 Month'))

What kind of data obtained from a paypal transaction I should store inside my local database?

旧时模样 提交于 2021-02-10 09:30:27
问题 Which informations obtained from IPN you should keep inside your local Database ? Is the $_POST['txn_id'] field the only field needed to assure you a retrack of all the transaction informations from paypal? Or is it better to insert all informations obtained from the IPN/PDT postback? Basically i'm trying to figure out wich info I need to store in case of a transaction problem and/or a user complaint. 回答1: No, the txn_id isn't enough. According to the documentation PayPal provides on their

PayPal PHP SDK not working for Subscriptions, get RESOURCE_NOT_FOUND

假如想象 提交于 2021-02-10 06:10:23
问题 I try to use PayPal Smart Button to purpose payment on a website. I first created a plan, I got its ID, and I activated it, via commands with the API and the PayPal SDK in PHP. The plan appears to be active. <script src="https://www.paypal.com/sdk/js?client-id=sb-key&vault=true&disable-funding=card"></script> <script> paypal.Buttons({ env: 'sandbox', createSubscription: function(data, actions) { return actions.subscription.create({ 'plan_id': 'P-85G86700MN...223CGEJWTI' }); }, onApprove:

Woocommerce Payment Method Detection in Checkout Page

十年热恋 提交于 2021-02-08 09:55:46
问题 I am using woocommerce plugin and braintree extension of woocommerce for payment. I have enabled both card and paypal payment of woocommerce braintree to checkout. I am trying to figure out how to know which payment gateway the user selects before user actually checkouts and pays. Any hooks under woocommerce or braintree to find either credit card radio button or paypal payment radio button is checked for payment. However i know we can detect the gateway used for the particular order after

PayPal Smart Buttons returns me JSON error

醉酒当歌 提交于 2021-02-08 05:41:49
问题 I'm implementing Express Checkout Integration in PHP (using PayPal Smart Buttons) but I get an error when I try to pay. The error is triggered when the createOrder function is called. I believe the error lies in the server side, because the fetch is being executed successfully and the server generates an ORDER ID, however it does not properly pass the ORDER ID to the client and I end up with the following error: Error: Unexpected token S in JSON at position 0 I don't know what could be wrong

ExpressCheckout IPN Invalid response status 403

狂风中的少年 提交于 2021-02-08 05:30:57
问题 I am using PayPal IPN Listener class which was working great for months, but recently (without any code changes) I received a weird issue. The following code which validates the Instant Payment Notification throws an Exception: Invalid response status: 403 $listener = new IpnListener(); $listener->use_sandbox = PAYPAL_SANDBOX; try { $listener->requirePostMethod(); $verified = $listener->processIpn(); } catch (Exception $e) { error_log('Process IPN failed: ' . $e->getMessage() . " [".$_SERVER[

ExpressCheckout IPN Invalid response status 403

一笑奈何 提交于 2021-02-08 05:30:08
问题 I am using PayPal IPN Listener class which was working great for months, but recently (without any code changes) I received a weird issue. The following code which validates the Instant Payment Notification throws an Exception: Invalid response status: 403 $listener = new IpnListener(); $listener->use_sandbox = PAYPAL_SANDBOX; try { $listener->requirePostMethod(); $verified = $listener->processIpn(); } catch (Exception $e) { error_log('Process IPN failed: ' . $e->getMessage() . " [".$_SERVER[