Skip to content

Commit

Permalink
added test ideal paymentMethods.create
Browse files Browse the repository at this point in the history
  • Loading branch information
ih-abir committed Feb 7, 2024
1 parent 3f827b7 commit d906973
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/workers/dilmahtea-me-stripe/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ const handlePOST = async (request, env, ctx) => {
// Create new Checkout Session for the order.
// 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,
},
});

function convertPriceToCents(price, quantity = 1) {
return Math.round(price * quantity * 100);
Expand Down

0 comments on commit d906973

Please sign in to comment.