You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using stripe-mock for our e2e tests requiring stripe API calls. There we required to change the stripe api base url per request as:
public PaymentMethod createPaymentMethod(Card card) {
var paymentMethodParams =
PaymentMethodCreateParams.builder()
.setType(Type.CARD)
.setCard(
CardDetails.builder()
.setNumber(card.getNumber())
.setExpMonth((long) card.getExpiryMonth())
.setExpYear((long) card.getExpiryYear())
.setCvc(card.getCvv())
.build())
.build();
var response = testMode? "Make API call to mock stripe with params" : PaymentMethod.create(paymentMethodParams);
return response;
}
This could be done globally via static method as
Stripe.overrideApiBase();
but this changes the url of stripe api globally, It could have been usable if I could have overridden the api url per request, maybe via RequestOptions. Please do let if know if there are any problems, this should be easy, or not?
The text was updated successfully, but these errors were encountered:
@devansh-dalal Thanks for the report! We'll track this internally but I think it will only happen once we ship support for the client/services infrastructure we're working on!
Hi
We are using stripe-mock for our e2e tests requiring stripe API calls. There we required to change the stripe api base url per request as:
This could be done globally via static method as
but this changes the url of stripe api globally, It could have been usable if I could have overridden the api url per request, maybe via
RequestOptions
. Please do let if know if there are any problems, this should be easy, or not?The text was updated successfully, but these errors were encountered: