Return URL Error
-
Hello, Thanks for the plugin. Job well done.
Could you help troubleshoot what the error could be during demo and return URL provides the error below.
Warning: end() expects parameter 1 to be array, null given in /home/…/public_html/wp-content/plugins/woocomerce-globalpay/woocommerce-globalpay.php on line 363
Warning: end() expects parameter 1 to be array, null given in /home/…/public_html/wp-content/plugins/woocomerce-globalpay/woocommerce-globalpay.php on line 364
Warning: end() expects parameter 1 to be array, null given in /home/…/public_html/wp-content/plugins/woocomerce-globalpay/woocommerce-globalpay.php on line 365
Warning: end() expects parameter 1 to be array, null given in /home/…/public_html/wp-content/plugins/woocomerce-globalpay/woocommerce-globalpay.php on line 366
Warning: end() expects parameter 1 to be array, null given in /home/…/public_html/wp-content/plugins/woocomerce-globalpay/woocommerce-globalpay.php on line 367
Hoping to hear from you soon.
-
Hello,
I will get back to you on this as soon as possible. In the meantime, can you post the version detials of WordPress, WooCommerce and WooCommerce GlobalPay that you are using?Installation details:
WordPress version 4.1.1
WooCommerce v2.3.7
WooCommerce GlobalPay v3.2
Hoping to hear from you soon.
Thanks
The plugin was not tested against your version of Woocommerce.
An update to the plugin is scheduled for release within the next few days. You can download it when it becomes available.
Hello,
I was not able to reproduce this issue.If you can post your logs I may provide more information.
Additionally, the latest version (3.3) has just been released. There are only some minor changes. Nonetheless, you can try it out on your site and see if the warning still comes up.
I probably should mention that PHP warnings do not cause a site to stop working. However they point at likely causes of fatal errors in the future.
I updated to v3.3, the warning still occurs.
Find below logs
-------------------------------------------------- 02-20-2015 @ 08:43:18 - Generating payment form for order #673. 02-20-2015 @ 08:43:18 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 0-673-1424421798 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-20-2015 @ 09:57:57 - Generating payment form for order #674. 02-20-2015 @ 09:57:57 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5500 [currency] => NGN [merch_txnref] => 0-674-1424426277 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-23-2015 @ 09:38:43 - Generating payment form for order #675. 02-23-2015 @ 09:38:43 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 3-675-1424684323 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-23-2015 @ 09:48:55 - Generating payment form for order #675. 02-23-2015 @ 09:48:55 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5500 [currency] => NGN [merch_txnref] => 3-675-1424684935 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-25-2015 @ 21:04:24 - Generating payment form for order #679. 02-25-2015 @ 21:04:24 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 3-679-1424898264 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-25-2015 @ 22:26:33 - Generating payment form for order #680. 02-25-2015 @ 22:26:33 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 1-680-1424903193 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 02-26-2015 @ 14:12:50 - Generating payment form for order #681. 02-26-2015 @ 14:12:50 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 0-681-1424959970 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-02-2015 @ 09:46:11 - Generating payment form for order #683. 03-02-2015 @ 09:46:11 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 6000 [currency] => NGN [merch_txnref] => 3-683-1425289571 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-02-2015 @ 14:23:27 - Generating payment form for order #684. 03-02-2015 @ 14:23:27 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 4-684-1425306207 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-02-2015 @ 14:33:36 - Generating payment form for order #685. 03-02-2015 @ 14:33:36 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 6000 [currency] => NGN [merch_txnref] => 4-685-1425306816 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-02-2015 @ 14:36:50 - Generating payment form for order #686. 03-02-2015 @ 14:36:50 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 4-686-1425307010 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-02-2015 @ 20:18:19 - Generating payment form for order #687. 03-02-2015 @ 20:18:19 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 6000 [currency] => NGN [merch_txnref] => 3-687-1425327499 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-03-2015 @ 22:38:00 - Generating payment form for order #688. 03-03-2015 @ 22:38:00 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 6000 [currency] => NGN [merch_txnref] => 0-688-1425422280 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-05-2015 @ 14:35:46 - Generating payment form for order #690. 03-05-2015 @ 14:35:46 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 0-690-1425566146 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-05-2015 @ 19:21:29 - Generating payment form for order #691. 03-05-2015 @ 19:21:29 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 1-691-1425583289 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 03-06-2015 @ 11:07:46 - Generating payment form for order #692. 03-06-2015 @ 11:07:46 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 3-692-1425640066 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-06-2015 @ 11:39:37 - Generating payment form for order #693. 03-06-2015 @ 11:39:37 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 4-693-1425641977 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-09-2015 @ 15:55:27 - Generating payment form for order #695. 03-09-2015 @ 15:55:27 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 1-695-1425916527 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-09-2015 @ 15:57:22 - Transaction details received on user return from GlobalPay: Array ( [key] => wc_order_54fdc26c8659a ) 03-09-2015 @ 15:57:22 - Connecting to GlobalPay at https://demo.globalpay.com.ng/GlobalpayWebService_demo/service.asmx?wsdl 03-09-2015 @ 15:57:26 - Response dump from GlobalPay Array ( [getTransactionsResult] => <resultset></resultset> ) 03-09-2015 @ 16:04:54 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 16:06:15 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 16:07:08 - Generating payment form for order #696. 03-09-2015 @ 16:07:08 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 1-696-1425917228 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-09-2015 @ 16:08:05 - Transaction details received on user return from GlobalPay: Array ( [key] => wc_order_54fdc529f417f ) 03-09-2015 @ 16:08:05 - Connecting to GlobalPay at https://demo.globalpay.com.ng/GlobalpayWebService_demo/service.asmx?wsdl 03-09-2015 @ 16:08:07 - Response dump from GlobalPay Array ( [getTransactionsResult] => <resultset></resultset> ) 03-09-2015 @ 16:18:14 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 16:19:22 - Generating payment form for order #697. 03-09-2015 @ 16:19:22 - User redirected to GlobalPay with the following: GlobalPay URL: https://www.globalpay.com.ng/Paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 1-697-1425917962 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-09-2015 @ 16:20:39 - Generating payment form for order #697. 03-09-2015 @ 16:20:39 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 1-697-1425918039 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-09-2015 @ 16:21:35 - Transaction details received on user return from GlobalPay: Array ( [key] => wc_order_54fdc806f1189 ) 03-09-2015 @ 16:21:35 - Connecting to GlobalPay at https://demo.globalpay.com.ng/GlobalpayWebService_demo/service.asmx?wsdl 03-09-2015 @ 16:21:37 - Response dump from GlobalPay Array ( [getTransactionsResult] => <resultset></resultset> ) 03-09-2015 @ 16:22:14 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 16:22:49 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 16:23:53 - generate_globalpay_form aborted because of possible duplicate call 03-09-2015 @ 17:30:13 - Generating payment form for order #698. 03-09-2015 @ 17:30:13 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 3-698-1425922213 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-12-2015 @ 20:09:40 - Generating payment form for order #700. 03-12-2015 @ 20:09:40 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 2000 [currency] => NGN [merch_txnref] => 3-700-1426190980 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 03-13-2015 @ 16:25:35 - Generating payment form for order #701. 03-13-2015 @ 16:25:35 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263935 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:25:47 - Generating payment form for order #701. 03-13-2015 @ 16:25:47 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263947 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:25:53 - Generating payment form for order #701. 03-13-2015 @ 16:25:53 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263953 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:25:54 - Generating payment form for order #701. 03-13-2015 @ 16:25:54 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263954 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:25:57 - Generating payment form for order #701. 03-13-2015 @ 16:25:57 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263957 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:26:00 - Generating payment form for order #701. 03-13-2015 @ 16:26:00 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426263960 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:27:30 - Generating payment form for order #701. 03-13-2015 @ 16:27:30 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 7000 [currency] => NGN [merch_txnref] => 4-701-1426264050 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-13-2015 @ 16:29:03 - Transaction details received on user return from GlobalPay: Array ( [key] => wc_order_55030f7cc1123 ) 03-13-2015 @ 16:29:03 - Connecting to GlobalPay at https://demo.globalpay.com.ng/GlobalpayWebService_demo/service.asmx?wsdl 03-13-2015 @ 16:29:06 - Response dump from GlobalPay Array ( [getTransactionsResult] => <resultset></resultset> ) 03-19-2015 @ 13:49:36 - Generating payment form for order #703. 03-19-2015 @ 13:49:36 - User redirected to GlobalPay with the following: GlobalPay URL: https://demo.globalpay.com.ng/globalpay_demo/paymentgatewaycapture.aspx Array ( [merchantid] => 5592 [amount] => 5000 [currency] => NGN [merch_txnref] => 1-703-1426772975 [name] => Peter Mokalo [names] => Peter Mokalo [email_address] => [email protected] [phone_number] => +2348059561196 ) 03-19-2015 @ 13:51:02 - Transaction details received on user return from GlobalPay: Array ( [key] => wc_order_550ad3ed1530c ) 03-19-2015 @ 13:51:02 - Connecting to GlobalPay at https://demo.globalpay.com.ng/GlobalpayWebService_demo/service.asmx?wsdl 03-19-2015 @ 13:51:04 - Response dump from GlobalPay Array ( [getTransactionsResult] => <resultset></resultset> ) 03-19-2015 @ 13:51:53 - generate_globalpay_form aborted because of possible duplicate call ----------------------------------------------------------
I hope this helps.
Thanks.
Please enable debug logging on your WordPress installation and send me the logs. That is where the PHP warning will be.
Additionally, what’s the URL of your site?
The debug logging is currently enabled in wc-logs and named as “globalpay-4eebf0d49fb981c3e1d5222f0a949079.log”
Content has been pasted above.
You can enable WordPress debugging by adding these to your wp-config.php:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
You will find the log file at /wp-content/debug.log
Find below content of log file
---------------------------------------- [19-Mar-2015 15:30:04 UTC] PHP Notice: Undefined index: names in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 540 [19-Mar-2015 15:30:04 UTC] PHP Notice: Undefined index: payment_status_description in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 314 [19-Mar-2015 15:30:06 UTC] PHP Warning: end() expects parameter 1 to be array, null given in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 363 [19-Mar-2015 15:30:06 UTC] PHP Warning: end() expects parameter 1 to be array, null given in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 364 [19-Mar-2015 15:30:06 UTC] PHP Warning: end() expects parameter 1 to be array, null given in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 365 [19-Mar-2015 15:30:06 UTC] PHP Warning: end() expects parameter 1 to be array, null given in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 366 [19-Mar-2015 15:30:06 UTC] PHP Warning: end() expects parameter 1 to be array, null given in /home/xxxxxxxx/public_html/wp-content/plugins/woocommerce-globalpay/woocommerce-globalpay.php on line 367 ----------------------------------------------------------------------
Thanks.
Done That. having issues pasting the code.
Yes – they were in the spam filter because you need to use the code buttons – I’ve also deleted your many duplicate threads.
Hello,
I have just had a closer look at the plugin’s log and I see that there is an response from the GlobalPay is empty in the get_transaction_status() method.I think this is most like caused by the theme. To confirm this install any stock theme for woocommerce from the WordPress repository. You can go here to download anyone of your choice https://www.ads-software.com/themes/search/woocommerce/
If the error does not occur with any of these themes then we can be certain that it your current theme that is the cause.
Please try that and let me know how it goes.
Hello,
Attempt was made using 2 different themes but the warning/error still persist as the zenith bank technical team requires the site to display ALL the details from the webservice and also remove the stack trace so it makes the page tidy.
Any other option?
Hoping to hear from you soon.
Thanks.Hello,
If the error still persists on your website then some plugin or the other may be conflicting with woocommerce-globalpay. It may also be something on your server that’s causing it.To isolate the problem, I recommend creating a fresh installation of WordPress and WooCommerce only in a sub-folder on your server. Then you should install a woocommerce-ready theme from https://www.ads-software.com/themes/search/woocommerce/ and then import demo products into the Woocommerce shop.
Afterwards, install the woocommerce-globalpay plugin, test a payment and then see if the error shows up. If it does not, install all the plugins on your main website one by one. After each plugin is installed test the payment. If an error shows up then you can infer that the just-installed plugin is the source of the problem.
Good luck
Hello,
Thanks for your effort so far. after creating a fresh installation on in a sub-folder on your server as suggested, however, the error is still persists with only the woocommerce-globalpay plugin being installed.
After installing on another server with same procedure above, it revrts to the original return URL and not able to view details.
Any ideas on the error showing on line 363 – 367 when using the plugin?
- The topic ‘Return URL Error’ is closed to new replies.