i'm using CreateInvoice.php this code for creating paypal invoices. But problem is just like express checkout and formal paypal checkout i can't figure out how to add notify_url
, cancel_url
, return_url
while creating invoices.
And in samples i can't find how to accomplish this job.
The parameters you are asking about are not relevant to the invoicing API.
notify_url
is to specify an IPN URL. The REST API does not use IPN, though. Instead, it uses Webhooks. You can register those manually within your REST App in your PayPal developer account, or you can set them up with the API.
cancel_url
and return_url
are used with things like the checkout APIs so that PayPal knows where to send the user when they make those actions. The CreateInvoice invoice API would not need this, though, because there is no redirect to PayPal / login happening with the user.
Instead, it's simply using your API credentials to create the invoice and give you a success or fail result. Based on that result you can redirect wherever you want. Again, you're never leaving your app in this case, so you don't need to specify where to be sent back.
Hope that helps.