Support » Plugin: WooCommerce eWAY Gateway » Token payment not working

  • Resolved m.spierings

    (@mspierings)


    I have setup a fresh docker container with WordPress 5.0.3 and the latest WC and WC eway plugin.
    Created a store with some products, hooked up my Eway sandbox environment and created an order.
    After checking the post_meta in my DB for the order, I didn’t see a _eway_token_customer_id field. While being logged in as a customer, I tried again and with the new order I still do not get a token.

    The reason for this tests is that I got the strange behaviour in my real, new website, where the first order with a NEW customer, doesn’t result in a token.
    However, when I create a second order whilst being logged in, I do get a _eway_token_customer_id value with the order.

    It is imperative for me to get that token with the first order, because after that I will auto renew the product using the tokenpayment option.

    Debugging this issue is hell, and I find it very disconcerting that on my fresh WP installation I get no token at all.

    Is there anyone that has a bright idea?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Please also read my post on stackoverflow:

    https://stackoverflow.com/questions/54377982/woocommerce-eway-plugin-not-creating-customer-token

    It looks like this is a bug/oversight to me and I would love to chat to a contributor about this.
    For now I will fix it by adding the new value to my order so that the access_token is generated correctly.

    Plugin Support Con Schneider

    (@conschneider)

    Automattic Happiness Engineer

    Howdy,

    It is imperative for me to get that token with the first order, because after that I will auto renew the product using the tokenpayment option.

    That sounds like a valid enhancement suggestion
    From what I understand your observations don’t result in any features of the plugin not being executed as in the plugin does operate ok without your suggestions, correct?

    Kind regards,

    Hi,

    Yes the payment is handled correctly.
    When request_aaccess_code is called one a new order, new user, it will execute $token_payment = $this->get_token_customer_id( $order ); which results in an empty string. So it always defaults the the last IF block which results in no token.
    It should always go into the first IF block so that a token is generated.
    I force that by adding ‘new’ to the orders _eway_token_customer_id post_meta myself.

    Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    Thanks for the follow up @mspierings

    I’ve passed this information along to our development team. While I’m not able to say what changes may be done, or when, they’ll be able to review what you shared and decide on addressing this.

    The detailed explanation that you’ve provided on your Stack Overflow post will be very helpful, so thank you very much for that! I will include that and this forum thread in my note to our developers in case they wish to follow up with you.

    My pleasure.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Token payment not working’ is closed to new replies.