Skip to content

Commit

Permalink
test for paypal
Browse files Browse the repository at this point in the history
  • Loading branch information
ih-abir committed Feb 8, 2024
1 parent d5f8586 commit 7eb44c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/workers/dilmahtea-me-stripe/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
});

Expand All @@ -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,
});

Expand Down

0 comments on commit 7eb44c4

Please sign in to comment.