Skip to content

Commit b9f7968

Browse files
authored
fix(payment-stripe): embedded checkout (#137)
1 parent 07d7ed7 commit b9f7968

File tree

1 file changed

+6
-3
lines changed
  • microservices/payment-stripe/src/services/payment-gateway

1 file changed

+6
-3
lines changed

microservices/payment-stripe/src/services/payment-gateway/stripe.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,12 @@ class Stripe extends Abstract {
472472
}));
473473

474474
/* eslint-disable camelcase */
475-
let checkoutParams: StripeSdk.Checkout.SessionCreateParams = {
475+
let checkoutParams: Omit<StripeSdk.Checkout.SessionCreateParams, 'success_url'> & {
476+
success_url?: string;
477+
} = {
476478
line_items: lineItems,
477479
mode: 'payment',
478480
customer: customerId,
479-
success_url: '',
480481
};
481482

482483
/**
@@ -509,7 +510,9 @@ class Stripe extends Abstract {
509510
url,
510511
// @ts-ignore
511512
client_secret: clientSecret,
512-
} = await this.sdk.checkout.sessions.create(checkoutParams);
513+
} = await this.sdk.checkout.sessions.create(
514+
checkoutParams as StripeSdk.Checkout.SessionCreateParams,
515+
);
513516
/* eslint-enable camelcase */
514517

515518
await this.createTransaction(

0 commit comments

Comments
 (0)