Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
273 stars 81 forks source link

[FEATURE REQUEST] Allow passing a description to the order details #39

Open zachweinberg opened 4 years ago

zachweinberg commented 4 years ago

It would be great to be able to add a description prop to the component so we can add text to the order details and know what an order was for.

ovxrfl0w commented 4 years ago

You can already add text (description) to the payment. Just not through a prop.

createOrder={(data, actions) => {
    return actions.order.create({
    purchase_units: [
        {
            description: this.state.itemName,
            amount: {
                currency_code: "USD",
                value: this.props.price,
            },
        },
    ],
    });
}}
Misiu commented 4 years ago

@ovxrfl0w thank you!!!!

Odelya commented 4 years ago

Can it be sent as a parameter?