cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this solution

Solved

avi312singh
Contributor
Contributor
    const createOrder = (data, actions) => {
        return actions.order
            .create({
                purchase_units: [
                    {
                        amount: {
                            value: donationAmount,
                        },
                    },
                ],
                application_context: {
                    shipping_preference: "NO_SHIPPING"
                }
            })
            .then((orderID) => {
                setOrderID(orderID);
                return orderID;
            });
    }

View solution in original post

Login to Me Too
Who Me Too'd this solution