• Resolved chrismask

    (@chrismask)


    The only place where Google and Apple Pay are displayed is on the default checkout page of woocommerce (form-checkout.php). But my site uses Pay for Order checkout template which is programmatically different than the default checkout page since its uses form-pay.php code. In this, the express checkout fields are missing. I manually tried to bypass this and add express checkout (G/A Pay) but only managed to do half the process.
    By adding <?php do_action( ‘woocommerce_checkout_before_customer_details’ ); ?> into first lines of form-pay.php, now Google and Apple Pay are requested and displayed but the problem is that order details (totals etc) are not correctly communicating with these express payments and thus G/A Pay always display the price of the cart items. The Pay for Order template doesnt load the items into cart, its like creating a link for paying only specific items, so it always displays different price. https://ibb.co/KK3vkdG (53EUR is the price of item in cart and the Pay for Order item is 1.24 EUR).
    So is support for form-pay.php coming or should I find a way to fix it manualy?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    To check this much better, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.  Let us know, thank you.

    Thread Starter chrismask

    (@chrismask)

    Hi @chrismask

    It’s hard to say what’s going on without checking your core customized files, which is a bit out of scope for us.

    You can double-check the WooCommerce Code Reference for that particular file to see if yours is similar, and has all the basic functions:

    https://woocommerce.github.io/code-reference/files/woocommerce-templates-checkout-form-pay.html

    You can also check if you have correctly enabled the Express Checkout with the WooCommerce Stripe Gateway plugin.

    You can do this by navigating by WordPress Dashboard > WooCommerce > Settings > Payments > Locate the Stripe method (double-check if it’s enabled), and then click on Manage.

    On that screen, you can check if the Express Checkout is enabled and where it’s displayed (checkout page, cart page etc).

    Sample screenshot: https://snipboard.io/luKadU.jpg

    If everything fails, I’d recommend doing a conflict test, and the best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated.

    To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict.

    You can find a more detailed explanation on how to do a conflict test here.

    Let us know how it goes! My very best,

    Thread Starter chrismask

    (@chrismask)

    I told you numerous times, my express checkout payments work, for cart for checkout etc. But currently by default it doesn’t get in form-pay.php. Its not my site problem, I had already checked this form-pay.php template and it’s the same as mine. It simply doesn’t work. You have to put the code I wrote before to request the buttons but it doesn’t give the required data and thus it has 0 total price to pay. Why don’t you check this on a site of your developing team? I am asking if this is planned to be added in the future.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @chrismask,

    Sorry for the confusion here. I’m not aware of any of our payment gateways that have support for express payments on the “Pay for order” page.

    You can open up an idea for this on the Ideas Board to get it in front of the developers.

    http://ideas.woocommerce.com/forums/133476-woocommerce

    That said, if you’re looking to add this quickly, you’ll probably want to go on and code a solution yourself.

    Let us know if you have any questions.

    Thread Starter chrismask

    (@chrismask)

    I have multiple people working on this and cant find a solution. Could you or someone else advise on what we shall do? If we load the product into cart would it work? By default Pay for Order doesnt load the product into cart, so maybe thats a probable cause of the issue.

    Plugin Support nicw.a11n

    (@nicw)

    Hi @chrismask

    While we’re not aware of payment gateways that support express payments on the “Pay for order” page, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
    
    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
    
    You can also visit the Stripe Github repository here for more information on future plans.

    Thread Starter chrismask

    (@chrismask)

    It needs to be added by Stripe and Woocommerce team. I have tried to integrate it but I am stuck at 90%. It now adds the buttons, loads the item into express checkout but it duplicates the order so when you pay, the copied order is completed and not the default one.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    …but it duplicates the order so when you pay, the copied order is completed and not the default one.

    That may be the reason these buttons aren’t included here. As a workaround, you might be able to create a function that deletes the original order when an invoice is paid via an express checkout function. That may be easier to create than preventing a duplicate order.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Form-pay.php Google/Apple Pay’ is closed to new replies.