From 4f1f22aa70723fb77d22cc1237a1b85b1d3ae1bd Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Wed, 16 Aug 2023 08:16:45 +0100 Subject: Parameterises PayPal product details --- api/_Order.d.ts | 2 +- api/_paypal.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/_Order.d.ts b/api/_Order.d.ts index cf1ff81..d08ca9f 100644 --- a/api/_Order.d.ts +++ b/api/_Order.d.ts @@ -1,7 +1,7 @@ type Order = { productDescription: string; shortDescription: string; - totalPrice: number; + totalPrice: string; }; export default Order; diff --git a/api/_paypal.ts b/api/_paypal.ts index e0447c0..5abb198 100644 --- a/api/_paypal.ts +++ b/api/_paypal.ts @@ -38,7 +38,7 @@ function paypalCreateOrderRequestBody(order: Order) { soft_descriptor: order.shortDescription, amount: { currency_code: 'GBP', - value: order.totalPrice.toFixed(2), + value: order.totalPrice, }, }, ], -- cgit v1.2.3