• Resolved 5imone

    (@5imone)


    Hello!

    Before explaining my request, I would like to congratulate you for the excellent plugin. It works way better than the official one ??

    But I have this issue (I’ll try to explain it at my best):
    When I try to submit a payment with Google Pay, but failing the validation (e. g. terms not accepted, missing required fields), my checkout page shows the error message (correct), but the Google Pay button becomes hidden, showing instead the standard checkout button (the “place order” one). Then if I try to change my payment method to the standard one and go back to GPay, it won’t show either.

    Investigating the problem I discovered that the issue is caused by the function on_token_received (wc-stripe.js, row 1003). Here I saw these lines:

    this.payment_token_received = true;
    this.set_nonce(paymentMethod.id);
    this.hide_payment_button();
    this.show_place_order();

    So, getting to the point, my question is: Why the standard button needs to be reverted when you receive the token? And why there isn’t a “remove token” function that reset the operation if the validation fails?

    Maybe this is just my problem but I really hope to contribute to the improvement of this plugin.

    Thank you for your attention,
    Simone

    • This topic was modified 3 years, 10 months ago by 5imone.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @5imone,

    And why there isn’t a “remove token” function that reset the operation if the validation fails?

    Validation didn’t fail because of the payment method, it failed because a required checkout field was missing. That won’t affect the payment token so there is no need to make the customer go through the GPay Wallet process again. That would cause unnecessary friction .

    One the payment token is received, the Place Order button is always displayed in place of the GPay button. That’s because the next logical step in the checkout process is to click the Place Order button once all required fields have been filled out.

    Kind Regards,

    Thread Starter 5imone

    (@5imone)

    Thank you for the fast response!

    Okay, this makes sense. In my opinion it could be disorienting for the user (if I click “Buy with GPay” and the validation fails, I expect to find the same button once I filled the required fields) but that’s an UX problem, it would take an UX specialist to confirm that.

    If I wanted to get the result anyway, do you know a better solution than overriding your script? Thank you again!

    • This reply was modified 3 years, 10 months ago by 5imone.
    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @5imone,

    The only way to achieve the result you’re looking for is to override the script.

    I would be cautious changing that UX though. If the GPay buttons is shown after the payment token is received, the customer might think they have to go through the GPay payment process again which will hurt your conversion rate.

    Kind Regards,

    Thread Starter 5imone

    (@5imone)

    Hello @mrclayton,
    I tried several checkout processes on other websites and you’re right. The best practice seems to be permitting the GPay payment process only after a successful validation of the required fields.

    Thank you for the support!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GPay button disappears on failed validation’ is closed to new replies.