Support » Plugin: GoDaddy Payments for WooCommerce » PHP Fatal Error: Argument 2 passed to Cards\TokenizeRequest null given

  • Resolved Sean Conklin

    (@seanconklin)


    Hi. We’re seeing this PHP error quite a bit in the logs:

    – 2022-02-20T17:36:23+00:00
    – 2022-02-21T00:01:38+00:00
    – 2022-02-22T00:21:47+00:00
    – 2022-03-04T11:33:22+00:00
    – 2022-03-14T00:56:02+00:00

    CRITICAL Uncaught TypeError: Argument 2 passed to GoDaddy\WooCommerce\Poynt\API\Cards\TokenizeRequest::__construct() must be of the type string, null given, called in wp-content/plugins/godaddy-payments/src/API/GatewayAPI.php on line 273 and defined in wp-content/plugins/godaddy-payments/src/API/Cards/TokenizeRequest.php:32

    Stack trace:
    #0 wp-content/plugins/godaddy-payments/src/API/GatewayAPI.php(273): GoDaddy\WooCommerce\Poynt\API\Cards\TokenizeRequest->__construct(‘033f5189-35e5-4…’, NULL)

    #1 wp-content/plugins/godaddy-payments/src/Gateways/CreditCardGateway.php(569): GoDaddy\WooCommerce\Poynt\API\GatewayAPI->tokenize_payment_method(Object(Automattic\WooCommerce\Admin\Overrides\Order))

    #2 wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php(808): GoDaddy\WooCommerce\Poynt\Gateways\ in wp-content/plugins/godaddy-payments/src/API/Cards/TokenizeRequest.php on line 32

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Sean Conklin

    (@seanconklin)

    @ericaskyverge @julieskyverge @ryanskyverge any takers for this one?

    Plugin Support Erica – SkyVerge Support

    (@ericaskyverge)

    Hey @seanconklin,

    Thanks for getting in touch with us about Poynt! I apologize for the delay here. For some reason, our notification didn’t work for the original support ping, so thanks so much for pinging us directly!

    I’m sorry that plugin is producing these errors. I’m happy to help out here.

    I’d like to get a bit more information so that I can be sure to point you in the right direction. . Would you please let me know If you see an error like this associated with each transaction?

    Additionally, has this prevented you from accepting payments?

    Any additional details and/or screenshots you can include that you think would be helpful would be fantastic as well!

    Best,
    Erica

    Thread Starter Sean Conklin

    (@seanconklin)

    Hi Erica,

    Thanks for looking into this for us. We are receiving lots of payments so it’s certainly not affecting normal purchases.

    This is for a client of mine who I got signed-up with Poynt. I also have an account myself.

    From the looks of it I’d say it affects those trying to save their card to their profile, or use a card from their profile. We haven’t tested it to know precisely what the steps are to reproduce.

    PHP fatal errors have to be fixed in the code. Looking at the code, the object TokenizeRequest isn’t always being passed a nonce when initialized in the file src/API/GatewayAPI.php:273: $request = new TokenizeRequest( $this->getBusinessId(), $order->payment->nonce );

    I’m seeing seven occurrences of this crash so far today. The previous crash was five days prior. So it appears to repeat on refresh, i.e. when it affects a customer they are seeing something and retrying several times. We’re on the lookout for any trouble reports…

    Best,
    Sean Conklin

    Plugin Support Erica – SkyVerge Support

    (@ericaskyverge)

    Hey @seanconklin,

    Thanks so much for sharing the additional details with me! Based on the stack trace, it does look like this could be related to errors when saving a card.

    However, we use “tokenized” in two different ways. Sometimes we use it to talk about saving a unique token that matches up with a customer’s payment profile, so recurring payments can be processed. In this case, however, the tokenization mentioned in the error message is something expected that happens as part of every e-commerce transaction, where the processor gives us a “token” that’s used to identify the transaction for processing. It looks like this may be the part of the process where we’re seeing an error raised. In this case, a type error is raised from a PHP function expecting a nonce and getting a null value instead.

    The likely culprit here is that no nonce is ever being sent to the store in the POST request when the checkout form is submitted. With this in mind, I suspect that we might be able to gather a few more details by using the browser’s developer tools on the checkout page. Would it be possible to share the store URL so we can take a closer look?

    Best,
    Erica

    Thread Starter Sean Conklin

    (@seanconklin)

    Sure, this store is https://bestchinesemedicines.com

    Plugin Support Tim Dearing – SkyVerge

    (@tdearinggd)

    Hi Sean,

    Thanks for providing the store URL!. Upon initial review, I’m not noticing any javascript errors in the browser console. I’d like to investigate this further with you, obtaining a full system status report as well as seeing if there’s any additional logging available from the payment gateway itself.

    Our team is aware of this issue already with another merchant, though it’s early in the process and we’re trying to identify any commonalities. Could you send a request into support@skyverge.com and we’ll be able to track it from there?

    Cheers!
    Tim

    Thread Starter Sean Conklin

    (@seanconklin)

    Hi Tim,

    I just emailed the SSR to that support email. We’ll probably pick-up the conversation there, but I’ll stay tuned here if you need me to email anything further. I’ve temporarily enabled the Debug Mode setting on this site to see if any related logs show up.

    Plugin Support Tim Dearing – SkyVerge

    (@tdearinggd)

    Hi Sean,

    I’m going to close this thread here as we’ve been following up directly on this one 🙂

    Cheers!
    Tim

    Thread Starter Sean Conklin

    (@seanconklin)

    For community reference we’re still working through this one.

    We traced at least one trigger of this error to having the Stripe plugin active alongside GoDaddy Pay and a user with a stored Stripe card clicking into My Account > Payment Methods.

    I reproduced this issue once on my own site where Stripe is not installed and I had no link to stored cards until more recently, so there must be another trigger somewhere. Hopefully the one trigger is enough to get to the bottom of things.

    I’ll try to remember to update this ticket once we have things resolved. My main client who was using this plugin ended up disabling it due to her chargeback rejections being 100% higher that they were with Stripe. She’s still working through that with the hopes of a resolution but shut this off while that gets figured out.

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