Coder Social home page Coder Social logo

Comments (9)

ahmednabik avatar ahmednabik commented on September 15, 2024 1

OK Found what was wrong "Checkout Fields editor plugin"
Open your checkout page and make sure that
ALL FIELDS ARE ENABLED AND VISIBLE (billing fields too)
those fields are used by 2CO payment (generate token)

Can you help me pls, i am getting this error again, i thought it was solved but it is not.
I am using woofunnel and it styles my checkout page, but it gives that error "authentication failed"???

Thanks

I solved the error 2 years ago by removing any and all plugins that were modifying my woocommerce native checkout page. Since you are using woofunnel, it must be hiding an essential checkout field that is used by the 2checkout plugin to generate a token. I would recommend discussing this issue with woofunnel team and send them the 2checkout plugin files and ask them to check how the plugin is generating the token and see if they are hiding any required field from the checkout page.

I have since shifted to Shopify (best decision I ever made - f**k woocommerce) else I would have checked the plugin code and told you what the required fields are. If you are a bit familiar with coding, you can open the files in editor and see the part where the token is generated.

from woocommerce-2checkout-api.

ahmednabik avatar ahmednabik commented on September 15, 2024 1

I checked the code from the repository and here are the fields from "billing" address required to generate the token.

"billingAddr" => array(
                                        'name'          => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(),
                                        'addrLine1'     => $order->get_billing_address_1(),
                                        'addrLine2'     => $order->get_billing_address_2(),
                                        'city'          => $order->get_billing_city(),
                                        'state'         => $order->get_billing_state(),
                                        'zipCode'       => $order->get_billing_postcode(),
                                        'country'       => $order->get_billing_country(),
                                        'email'         => $order->get_billing_email(),
                                        'phoneNumber'   => $order->get_billing_phone()

If woofunnel is hiding the billing address inputs or any of the fields in the array above (name, address line 1, address line 2, city, state, zip code, country, email, phone number), the token will not be properly generated and the 2checkout API will return failed authorization.

Hope it helps. Best wishes.

from woocommerce-2checkout-api.

RomanStone avatar RomanStone commented on September 15, 2024

++ Same Problem.

Found More info:
issues/43
issues/34
issues/17

Checked address/phone, billing info. No luck

[Added]
Found related errors in wp-content/debug.log
[10-Sep-2019 14:40:27 UTC] PHP Notice: Undefined property: WC_Gateway_Twocheckout::$notify_url in wp-content/plugins/twocheckout/wc-twocheckout.php on line 364

from woocommerce-2checkout-api.

RomanStone avatar RomanStone commented on September 15, 2024

OK Found what was wrong "Checkout Fields editor plugin"
Open your checkout page and make sure that
ALL FIELDS ARE ENABLED AND VISIBLE (billing fields too)
those fields are used by 2CO payment (generate token)

from woocommerce-2checkout-api.

nobel0 avatar nobel0 commented on September 15, 2024

OK Found what was wrong "Checkout Fields editor plugin"
Open your checkout page and make sure that
ALL FIELDS ARE ENABLED AND VISIBLE (billing fields too)
those fields are used by 2CO payment (generate token)

Thank you very much for your comment, it helped me figure out what is happening to my store :)
It turned out because i am using a custom checkout plugin (Custom Fields WooCommerce Checkout Page By Jcodex) and it make a lot of troubles always getting authorization failed and lost so many sales because of that.. Man it ruined everything even facebook ads..
Thanks so much.

from woocommerce-2checkout-api.

nobel0 avatar nobel0 commented on September 15, 2024

OK Found what was wrong "Checkout Fields editor plugin"
Open your checkout page and make sure that
ALL FIELDS ARE ENABLED AND VISIBLE (billing fields too)
those fields are used by 2CO payment (generate token)

Can you help me pls, i am getting this error again, i thought it was solved but it is not.
I am using woofunnel and it styles my checkout page, but it gives that error "authentication failed"???

Thanks

from woocommerce-2checkout-api.

nobel0 avatar nobel0 commented on September 15, 2024

I checked the code from the repository and here are the fields from "billing" address required to generate the token.

"billingAddr" => array(
                                        'name'          => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(),
                                        'addrLine1'     => $order->get_billing_address_1(),
                                        'addrLine2'     => $order->get_billing_address_2(),
                                        'city'          => $order->get_billing_city(),
                                        'state'         => $order->get_billing_state(),
                                        'zipCode'       => $order->get_billing_postcode(),
                                        'country'       => $order->get_billing_country(),
                                        'email'         => $order->get_billing_email(),
                                        'phoneNumber'   => $order->get_billing_phone()

If woofunnel is hiding the billing address inputs or any of the fields in the array above (name, address line 1, address line 2, city, state, zip code, country, email, phone number), the token will not be properly generated and the 2checkout API will return failed authorization.

Hope it helps. Best wishes.

Thank you soo much Mr. Ahmednabi for helping me out and taking the time to help.
I will check the codes in woofunnel if they are matched with these arrays...

Question: Does it will through the "authentication failed" error even if the arrays are not ordered/listed as the 2checkout??
Because even tho i didn't delete any field BUT changed the order of the fields yet gives me that error << is there such thing?

Thanks a lot for helping me out..
Very appreciated
Best Regards

from woocommerce-2checkout-api.

nobel0 avatar nobel0 commented on September 15, 2024

Hello Mr. @ahmednabi058 and @craigchristenson .
Please i need your help ASAP, it is better if i can contact you through Skype, PLEASE.

I am always getting unauthorized guys, no matter what i do... I really need a help please... I am just wasting money on advertising... I am TOTALLY sure all the field array are available.. I have switched to cartflows but with the same problem, when NEW CUSTOMER enters his card details and click complete order he will get unauthorized.. I am pretty sure it is from this plugin...

Waiting for your response guys...
Please this is my skype name: nobel.ninja
Thanks

from woocommerce-2checkout-api.

craigchristenson avatar craigchristenson commented on September 15, 2024

Hey buddy I pinged you on skype, lets figure out whats going on.

from woocommerce-2checkout-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.