@managesome/eposmatic-toolkit 0.2.560 → 0.2.562

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -307,7 +307,7 @@ const getQRCodePaymentLink = (grandTotal, payments) => {
307
307
  // Only accept a real QR payload (not the initial placeholder)
308
308
  qrLink = raw != null && raw !== '**** **** **** ****' ? raw : undefined;
309
309
  amount = raastPayment?.amount_due;
310
- scanMessage = 'Scan with JazzCash, EasyPaisa, or Bank App to Pay';
310
+ scanMessage = 'Scan to Pay via EasyPaisa, JazzCash or Bank App';
311
311
  }
312
312
  if (!qrLink || !amount) {
313
313
  return null;
@@ -828,7 +828,9 @@ function receiptEngine(payload, mappedItems = {}) {
828
828
  order_link = payload.order.tax_invoice_id;
829
829
  }
830
830
  else {
831
- const qrCodePayment = (0, payment_helpers_1.getQRCodePaymentLink)(grandTotal, payments);
831
+ // Use raw order.payments here (not the settled-only `payments` list) because
832
+ // getQRCodePaymentLink looks for a PENDING RAAST_PAY payment to derive the QR link.
833
+ const qrCodePayment = (0, payment_helpers_1.getQRCodePaymentLink)(grandTotal, payload.order.payments);
832
834
  if (qrCodePayment != null) {
833
835
  order_link = qrCodePayment.qrLink;
834
836
  custom_message = qrCodePayment.scanMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.560",
3
+ "version": "0.2.562",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",