Non-functional Sandbox mode with Stripe

  • This topic has 9 replies, 3 voices, and was last updated 2 years ago by Fab.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1277870
    Fab
    Participant

    PHP: 7.4
    Wordpress: 5.9.2 (Installation by download via FileZilla (not by tool provided by the hosting provider))
    Oceanica theme: 2.0.4
    Oceanica Child theme: 1.0.0
    Oceanica Engine: 0.0.1
    Hotel Booking: 4.2.1
    One Click Demo Import: 3.0.2 (Disabled after import)
    Hotel Booking PDF Invoices: 1.2.1
    Hotel Booking Notifier: 1.1.2
    Hotel Booking Reviews: 1.2.6
    Hotel Booking Styles: 1.0.2

    Others:
    Getwid: 1.7.8
    Jetpack: 10.7

    Hi,

    I try to test the Sandbox mode with Stripe.

    “Pay by CB” and “Sandbox mode” are activated.
    The Stripe public and secret keys have been entered.
    I leave blank the “Webhook Secret” field.

    And I noted that when I try to access to the Webhooks destination URL (https://website.fr/index.php?mphb-listener=stripe) I obtain the error: “This page isn’t working
    If the problem continues, contact the site owner.
    HTTP ERROR 400”.

    Now when I confirm a booking and that I select “Pay by CB”, I can enter the CB data:
    Card: 4242424242424242
    Date: 04/24
    CVC: 123
    Zip code: 50000

    By clicking on “book now” button, the spinning waiting image is displayed but nothing happens, I stay on the same page and the “book now” button is clickable again.

    There is no errors in the logs.

    Apparently I forgot something but what? The “Webhook Secret” field is mandatory?

    Thank you in advance for any help.

    Fab

    #1278413
    Valeriia Bavykina
    Moderator

    Hello Fab!

    Try to clear your browser cache and cookies.
    The WebHook Secrete is needed only if you are going to enable additional payment methods under Stripe like Ideal, Sofort, Giropay, etc.

    #1278447
    Fab
    Participant

    Hello Valerie,

    Thank you for your reply.

    I tried again after deleting cache and cookies unfortunately this does not change anything.

    I tried with Firefox (98.0.1) and Opera (84.0.4316.42), and even disabling plugins (uBlock Origin, etc.) but I obtain the same result.

    Do you have another idea, please?

    Fab

    #1278504
    Valeriia Bavykina
    Moderator

    Hello Fab!

    Please check your Secrete and Public https://stripe.com/docs/keys#obtain-api-keys.
    /index.php?mphb-listener=stripe should be added to your site’s address
    Is this your site URL https://website.fr ? Make sure to have the correct link with index.php?mphb-listener=stripe in the URL of your Stripe account Webhook details.

    To enable any of the Stripe Payment Methods that I mentioned earlier, you should add Webhook Secret via Accommodation > Settings > Payment Gateways > Stripe > Webhook Secret.
    Webhook endpoints are configured in the Dashboard’s Webhooks settings page.
    Please, make sure to have these Event types for Webhook Secret are in your Stripe account:

    source.chargeable
    charge.succeeded
    charge.failed
    source.canceled
    source.failed
    #1278588
    Fab
    Participant
    This reply has been marked as private.
    #1278782
    J. Davis
    Keymaster

    Hi,

    Thanks for your reply. Yes, you are right there is no need to add WebHook Secret if none of the additional payment options under Stripe are enabled.
    Unfortunately, there is activated Under Construction mode and we can not reach the booking confirmation page to view the developer log console. Is there any way to make your site public? Or could you please submit a ticket and let us check your site?

    best regards,
    J. Davis

    #1278935
    Fab
    Participant
    This reply has been marked as private.
    #1278952
    Fab
    Participant
    This reply has been marked as private.
    #1279089
    Fab
    Participant
    This reply has been marked as private.
    #1279517
    J. Davis
    Keymaster

    Hi,

    Thanks for your replies. Unfortunately, the website is not public still. I’ve re-read your previous messages and noticed that you have used live keys while you are trying to enable sandbox. So you need to use test API keys for a Sandbox mode https://stripe.com/docs/keys. Please try to find test API keys within your Stripe account and try to use them in the settings of the hotel booking plugin.

    best regards,
    J. Davis

    #1279553
    Fab
    Participant

    Hi Mr. Davis,

    Thank you very much for your professionalism.

    I confirm for the readers of this forum that the true error displayed on the booking confirmation page was “Billing error. e.paymentMethod is undefined mphb.min.js” and was due to the fact that I used the Stripe production public and secret keys for the sandbox mode instead of the test mode keys (I thought it was just the test card numbers that differentiated production mode from test mode. Mea culpa!).

    After registration on Stripe, the URL to the test mode keys is https://dashboard.stripe.com/test/apikeys

    The URL to the production mode is https://dashboard.stripe.com/apikeys

    Thank you again Mr. Davis.

    Best regards,

    Fab

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.