diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-16 08:16:45 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-16 08:16:45 +0100 |
| commit | 4f1f22aa70723fb77d22cc1237a1b85b1d3ae1bd (patch) | |
| tree | 59af5bdca7abdefa0b913490f4734c00f9d24253 /api | |
| parent | 5f76bfe714c74b38019b0cdc316d003729905208 (diff) | |
Parameterises PayPal product details
Diffstat (limited to 'api')
| -rw-r--r-- | api/_Order.d.ts | 2 | ||||
| -rw-r--r-- | api/_paypal.ts | 2 |
2 files changed, 2 insertions, 2 deletions
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, }, }, ], |
