Skip to content

Methods not retrieving correctly for hosted checkout option #86

@x97wehner

Description

@x97wehner

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, 
            ];
        }*/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions