diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-03 10:38:52 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-03 10:38:52 +0700 |
| commit | b4abdb00ef83aa824e8a05d5b75df48adb7b9629 (patch) | |
| tree | 86ce2454793fe31b54a87f151433cbf86dbed134 /src/pages/api/shop/midtrans-payment.js | |
| parent | 31816dc3a6cb62e1480524c8f0065a7835fefdcd (diff) | |
semi dynamic page
Diffstat (limited to 'src/pages/api/shop/midtrans-payment.js')
| -rw-r--r-- | src/pages/api/shop/midtrans-payment.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/api/shop/midtrans-payment.js b/src/pages/api/shop/midtrans-payment.js index f7f29c7c..12aaa51f 100644 --- a/src/pages/api/shop/midtrans-payment.js +++ b/src/pages/api/shop/midtrans-payment.js @@ -22,7 +22,7 @@ export default async function handler(req, res) { {}, { Token: auth.token } ) - + if (!transaction?.id) { return res.status(400).json({ error: 'No Data' }) } @@ -57,7 +57,7 @@ export default async function handler(req, res) { customer_details: { first_name: transaction.address.customer.name, email: transaction.address.customer.email || '', - phone: transaction.address.customer.phone || '', + phone: transaction.address.customer.phone || '' } } |
