Jump to content

Edit History

Alex-

Alex-

Screenshot2024-04-06at15-.thumb.png.4d9070fcb108a35cefb1a41dff9b17c7.png

Hello,

After installing and configuring everything in live mode, the module Stripe Official keeps expecting and force to push the wrong webhook url :
Expected webhook URL : https://www.domain.module/stripe_official/webhook

but it should be : https://www.domain.fr/module/stripe_official/webhook ; like fixed on the Stripe.com > webhooks
The module wants to update to domain.module/stripe instead of domain.fr/module

I tried to look everywhere, remade the webhook, update the new webhook id in the db but it keeps asking the same wrong url and unfortunately all the orders made are not created in the BO, even if the payments have been received.

The domain of the shop on prestashop is correct btw

Shop url :https://www.domain.fr
Physical url : /

Thank you for your help.

 

Edit 1 : I found out the issue might be caused by this function in the file /stripe_official.php

/**
     * get webhook url of stripe_official module
     *
     * @return string
     */
    public static function getWebhookUrl()
    {
        $context = Context::getContext();
        $locale = $context->language->iso_code;

        $url = $context->link->getModuleLink(
            'stripe_official',
            'webhook',
            [],
            true,
            null,
            Configuration::get('PS_SHOP_DEFAULT')
        );

        return str_replace($locale . '/', '', $url);
    }

By changing this function by :

  /**
     * get webhook url of stripe_official module
     *
     * @return string
     */
    public static function getWebhookUrl()
{
    return 'https://www.domain.fr/module/stripe_official/webhook';
}

Or by :

public static function getWebhookUrl()
{
    $context = Context::getContext();

    // Obtenir l'URL générée dynamiquement
    $url = $context->link->getModuleLink(
        'stripe_official',
        'webhook',
        [],
        true,
        null,
        Configuration::get('PS_SHOP_DEFAULT')
    );

    return $url;
}

I don't have the message shown in the backoffice anymore. I'm not sure if the webhook will works properly though.

Alex-

Alex-

Screenshot2024-04-06at15-.thumb.png.4d9070fcb108a35cefb1a41dff9b17c7.png

Hello,

After installing and configuring everything in live mode, the module Stripe Official keeps expecting and force to push the wrong webhook url :
Expected webhook URL : https://www.domain.module/stripe_official/webhook

but it should be : https://www.domain.fr/module/stripe_official/webhook ; like fixed on the Stripe.com > webhooks
The module wants to update to domain.module/stripe instead of domain.fr/module

I tried to look everywhere, remade the webhook, update the new webhook id in the db but it keeps asking the same wrong url and unfortunately all the orders made are not created in the BO, even if the payments have been received.

The domain of the shop on prestashop is correct btw

Shop url :https://www.domain.fr
Physical url : /

Thank you for your help.

 

Edit 1 : I found out the issue might be caused by this function in the file /stripe_official.php

/**
     * get webhook url of stripe_official module
     *
     * @return string
     */
    public static function getWebhookUrl()
    {
        $context = Context::getContext();
        $locale = $context->language->iso_code;

        $url = $context->link->getModuleLink(
            'stripe_official',
            'webhook',
            [],
            true,
            null,
            Configuration::get('PS_SHOP_DEFAULT')
        );

        return str_replace($locale . '/', '', $url);
    }

By changing this function by :

  /**
     * get webhook url of stripe_official module
     *
     * @return string
     */
    public static function getWebhookUrl()
{
    return 'https://www.domain.fr/module/stripe_official/webhook';
}

I don't have the message shown in the backoffice anymore. I'm not sure if the webhook will works properly though.

Alex-

Alex-

Screenshot2024-04-06at15-.thumb.png.4d9070fcb108a35cefb1a41dff9b17c7.pngHello,

After installing and configuring everything in live mode, the module Stripe Official keeps expecting and force to push the wrong webhook url :
Expected webhook URL : https://www.domain.module/stripe_official/webhook

but it should be : https://www.domain.fr/module/stripe_official/webhook ; like fixed on the Stripe.com > webhooks
The module wants to update to domain.module/stripe instead of domain.fr/module

I tried to look everywhere, remade the webhook, update the new webhook id in the db but it keeps asking the same wrong url and unfortunately all the orders made are not created in the BO, even if the payments have been received.

The domain of the shop on prestashop is correct btw

Shop url :https://www.domain.fr
Physical url : /

Thank you for your help.

Alex-

Alex-

Hello,

After installing and configuring everything in live mode, the module Stripe Official keeps expecting and force to push the wrong webhook url :
Expected webhook URL : https://www.domain.module/stripe_official/webhook

but it should be : https://www.domain.fr/module/stripe_official/webhook ; like fixed on the Stripe.com > webhooks
The module wants to update to domain.module/stripe instead of domain.fr/module

I tried to look everywhere, to remake the webhook, update it in the db but it keeps asking the same thing and unfortunately all the orders made are not created in the BO, even if the payments have been received.

×
×
  • Create New...