From 766b0ebf4513db2a140d111b5936cbe4837211a6 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 13 Nov 2025 00:54:11 -0700 Subject: [PATCH] Add notes on return value of checkoutSavedMethod --- examples/payment-processor/plugin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/payment-processor/plugin.js b/examples/payment-processor/plugin.js index 56d2784..87e28c2 100644 --- a/examples/payment-processor/plugin.js +++ b/examples/payment-processor/plugin.js @@ -172,6 +172,9 @@ exports.init = function () { "Card on File\nx1234" // Additional text for receipt ) ); + // Must return true upon success. + // If the payment is not successful, and you didn't throw an Error to show the user, + // then `return false` instead and it'll appear that the user's action to start the payment did nothing. return true; }, saveCardForOfflineUse: async function ({statusCallback, customerUUID, name, company, street1, street2, city, state, zip, country, email, phone}) {