Open mpbunch opened 3 years ago
Hope this helps someone else.
createOrder={(data, actions) => {
return actions.order.create({
purchase_units: [
{
reference_id: "some_id",
description: `Some description ${this.state.something}`,
custom_id: "some_value_will_show_up_in_the_pay_pal_interface",
soft_descriptor: "product description",
amount: {
currency_code: "USD",
value: "20.00",
breakdown: {
item_total: {
currency_code: "USD",
value: "20.00"
}
}
},
items: [
{
name: "ITEM 1",
description: `ITEM 1 DESC: ${this.state.description}`,
sku: {this.state.item.skew},
unit_amount: {
currency_code: "USD",
value: "20.00"
},
quantity: this.state.quantity
},
]
}
],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
})
}}
is there not a way to tell paypal it's 10 pairs of socks and paypal already knows the unit price of each pair?
To Do First
Ask your Question I have a form where users can select some quantity or product. For example: 1 sock or 10 socks.
Sure I can sock.quantity * sock.price = payapl.amount But within paypal it then shows quantity 1 at a rate of total. The merchant doesn't know if this is 1 expensive sock, or 10 cheap socks.
Tags Quantity, Multiple Products, Multiple Items