Bug Report – Google Pay button Error
-
class-easy-payment-authorizenet-googlepay-gateway.php
Confirmed — this is a bug in the plugin. On line 1102:
$this->set_order_addresses_from_gpay($order, $addr_arr, $name_arr);$name_arris never defined anywhere inajax_express_pay(). The variable$shipping_nameis parsed on line 1031 as a plain string, but it’s never converted to the$name_arrarray thatset_order_addresses_from_gpay()expects (withfirstName/lastNamekeys).On PHP 8.5, passing an undefined variable where a typed
arrayparameter is expected causes a fatal error, which kills the AJAX request with a 500.The one successful transaction likely happened because the Google Pay payment sheet didn’t return a shipping name that time, so
$addr_arrwas empty and the code skipped line 1102 entirely.This is a plugin bug that needs to be fixed in the plugin file itself. The fix on line 1102 would be to replace
$name_arrwith a properly parsed array from$shipping_name.
You must be logged in to reply to this topic.