In your code you have the following: // Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [
{
amount: {
currency_code: currency,
value: totalProdPrice,
breakdown: {
item_total: { currency_code:currency, value:totalProdPrice},
} Notice the "purchase_units" section contains parameters like amount, currency_code, value, etc. When looking at the PayPal API reference specific to this purchase units section we can see all of the other parameters that are available, which includes the `invoice_id` parameter. So we just need to add that to the list the same way the other params are being used there: // Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [
{
amount: {
currency_code: currency,
value: totalProdPrice,
invoice_id: invoiceID,
breakdown: {
item_total: { currency_code:currency, value:totalProdPrice},
} This assumes you have a variable called `invoiceID` ready to pass into the request the same way you're using `currency` and `totalProdPrice`, for example. While reviewing that list in the PayPal doc you'll probably find lots of other params you would like to make use of, and you can add those the same way. Hope that helps!
... View more