-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Since the update to the new Stripe API for this module in version 1.8, my hosted checkout page has not reflected all available options that are enabled on the Stripe website dashboard. Specifically, things like Cash App and Afterpay were not showing up on the hosted checkout page anymore. I finally dug into it a bit on StripeApi.php and by commenting out the default code that sets type if no methods are returned, the page now operates correctly. It seems there is a problem in retrieving methods from stripe correctly.
This is all I changed to get this functioning as it is supposed to (The commented out part):
public function createCheckoutSession(
Cart $cart,
string $methodId,
array $methods = [],
array $paymentMethodOptions = []
) {
$context = Context::getContext();
$total = Utils::getCartTotal($cart);
$validationLink = Utils::getValidationUrl($methodId);
/* if (! $methods) {
$methods = [
\Stripe\PaymentMethod::TYPE_CARD,
];
}*/