Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize notify_url in rest api

Tags:

paypal

From the sample code by Paypal:

http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/CreatePaymentUsingPayPal.html

How can I define a notify_url in this practice like express checkout?

I found there's a method setNotifyUrl in PayPal\Api\TransactionBase Class, but it seems doesnot work correctly

Thanks in advance!

like image 509
Tank Avatar asked Sep 01 '26 12:09

Tank


1 Answers

The previous answer doesn't seem to apply anymore; it appears that, although this is undocumented, notify_url is used by the PayPal REST API. The following code works fine:

actions.payment.create({
            payment: {
                transactions: [
                    {
                        amount: { total: 100,
                            currency: "USD" },
                        notify_url: "http://www.example.com"
                    }
                ]
            }
        })
like image 154
Ashwin Ramaswami Avatar answered Sep 05 '26 18:09

Ashwin Ramaswami