Skip to content

in-person payments and payment_method_types with stripe #4575

Closed Answered by josipmatichr
tyler71 asked this question in Q&A
Discussion options

You must be logged in to vote

@srindom of course! @tyler71 I think you won't be able to set payment_method_types through environment variables since paymentIntentOptions should be defined through child class. I would suggest creating a new service that will extend base stripe service, something like this should work:

import StripeBase from "medusa-payment-stripe/dist/core/stripe-base"
import { PaymentIntentOptions } from "medusa-payment-stripe"

class StripeTerminalProviderService extends StripeBase {
  static identifier = "stripe-terminal"

  constructor(_, options) {
    super(_, options)
  }

  get paymentIntentOptions(): PaymentIntentOptions {
    return {
      payment_method_types: ["card", "card_present"],
    …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tyler71
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants