ソースを参照

feat(core): Implement cancelPayment in dummy payment handler

Relates to #1637.
Michael Bromley 3 年 前
コミット
177f905a16

+ 8 - 0
packages/core/src/config/payment/dummy-payment-method-handler.ts

@@ -89,4 +89,12 @@ export const dummyPaymentHandler = new PaymentMethodHandler({
             success: true,
         };
     },
+    cancelPayment: (ctx, order, payment) => {
+        return {
+            success: true,
+            metadata: {
+                cancellationDate: new Date().toISOString(),
+            },
+        };
+    },
 });