From 7eb44c466563b3ebe03b0f8aee3c5a999b0f574f Mon Sep 17 00:00:00 2001 From: ih-abir Date: Thu, 8 Feb 2024 11:02:09 +0600 Subject: [PATCH] test for paypal --- src/workers/dilmahtea-me-stripe/src/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/workers/dilmahtea-me-stripe/src/index.js b/src/workers/dilmahtea-me-stripe/src/index.js index 14e3a79b..2200cfea 100644 --- a/src/workers/dilmahtea-me-stripe/src/index.js +++ b/src/workers/dilmahtea-me-stripe/src/index.js @@ -83,9 +83,9 @@ const handlePOST = async (request, env, ctx) => { // Redirects the customer to s Stripe checkout page. // @see https://stripe.com/docs/payments/accept-a-payment?integration=checkout const paymentMethod = await stripe.paymentMethods.create({ - type: 'ideal', - ideal: { - bank: bank, + type: 'paypal', + paypal: { + payer_email: email, }, }); @@ -99,12 +99,13 @@ const handlePOST = async (request, env, ctx) => { const paymentIntent = await stripe.paymentIntents.create({ customer: customer.id, - payment_method_types: ['ideal'], + payment_method_types: ['paypal'], payment_method: paymentMethod.id, amount: totalAmount, currency: 'eur', metadata: { paymentID, payment_type }, confirm: true, + cancel_url: cancel_url, return_url: successUrl, });