Skip to content

Commit

Permalink
Merge pull request #203 from Plant-for-the-Planet-org/feature/paypal-…
Browse files Browse the repository at this point in the history
…order-object-fix

Feature/paypal order object fix
  • Loading branch information
sagararyal authored Dec 15, 2021
2 parents c0ade36 + c511500 commit 4dadc17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Donations/PaymentMethods/NewPaypal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ function NewPaypal({
const { donationUid } = React.useContext(QueryParamContext);

function createOrder(data, actions) {
const value = paymentSetup.unitBased
? quantity * unitCost
: quantity;
return actions.order.create({
purchase_units: [
{
amount: {
value: (paymentSetup.unitBased
? quantity * unitCost
: quantity
).toFixed(2),
value: value.toFixed(2),
currency: currency,
},
invoice_id: `planet-${donationID}`,
Expand Down

1 comment on commit 4dadc17

@vercel
Copy link

@vercel vercel bot commented on 4dadc17 Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.