Closed jeffa95 closed 8 years ago
I have this exact same issue. What is: ‘Cancel url is not a valid URL’,? and how do I fix it?
I'm having a hard time reproducing this. Is this occurring on fresh installs or recent upgrades? What versions of Wordpress and Woocommerce are you using? What is the exact cancel_url
present in the error message?
As a workaround you can use this branch which does not send the cancel_url but I would like to get to the bottom of this and implement a proper fix.
Thanks Alex.
I think it's because of the recent WordPress upgrade. I'm also running the latest WooCommerce version.
Here is the entire error from the comments area of WooCommerce.
I reset the keys, and rechecked the settings, Manage, Users, etc. in Coinbase, but not success.
I did find another solution that is similar to an Authorize.net gateway in that it works for many different cryptocurrencies. The company that made the plugin is in Dominica. I would rather use Coinbase-Woocommerce if you can tell me how to fix the plugin.
Mark Rudder BOLD Arms.
On 7/4/2016 5:07 PM, Alex Ianus wrote:
I'm having a hard time reproducing this. Is this occurring on fresh installs or recent upgrades? What versions of Wordpress and Woocommerce are you using? What is the exact |cancel_url| present in the error message?
As a workaround you can use this branch https://github.com/coinbase/coinbase-woocommerce/tree/aianus/remove_cancel_url which does not send the cancel_url but I would like to get to the bottom of this and implement a proper fix.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coinbase/coinbase-woocommerce/issues/29#issuecomment-230365305, or mute the thread https://github.com/notifications/unsubscribe/ATWNJg388-eXszsnMmdtYMGnU0vLdFBaks5qSaA6gaJpZM4JBwgK.
Error while processing coinbase payment: Coinbase_ApiException::__set_state(array( ‘message’ => ‘Cancel url is not a valid URL’, ‘string’ => ”, ‘code’ => 0, ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Rpc.php’, ‘line’ => 109, ‘trace’ => array ( 0 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Coinbase.php’, ‘line’ => 69, ‘function’ => ‘request’, ‘class’ => ‘Coinbase_Rpc’, ‘type’ => ‘->’, ‘args’ => array ( 0 => ‘POST’, 1 => ‘buttons’, 2 => array ( ‘button’ => array ( ‘name’ => ‘Order #2966’, ‘price_string’ => 640, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://boldarms.com/wc-api/WC_Gateway_Coinbase/?callback_secret=6260436a05b4b458ff26e57f3832aaae54219941’, ‘custom’ => 2966, ‘success_url’ => ‘https://boldarms.com/checkout-2/order-received/2966?key=wc_order_5775fd2d9927e&return_from_coinbase=1’, ‘cancel_url’ => ‘https://boldarms.com/cart-2/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_5775fd2d9927e#038;order=wc_order_5775fd2d9927e&order_id=2966&redirect’, ), ), ), ), 1 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Coinbase.php’, ‘line’ => 208, ‘function’ => ‘post’, ‘class’ => ‘Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => ‘buttons’, 1 => array ( ‘button’ => array ( ‘name’ => ‘Order #2966’, ‘price_string’ => 640, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://boldarms.com/wc-api/WC_Gateway_Coinbase/?callback_secret=6260436a05b4b458ff26e57f3832aaae54219941’, ‘custom’ => 2966, ‘success_url’ => ‘https://boldarms.com/checkout-2/order-received/2966?key=wc_order_5775fd2d9927e&return_from_coinbase=1’, ‘cancel_url’ => ‘https://boldarms.com/cart-2/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_5775fd2d9927e#038;order=wc_order_5775fd2d9927e&order_id=2966&redirect’, ), ), ), ), 2 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/coinbase-woocommerce/coinbase-woocommerce.php’, ‘line’ => 216, ‘function’ => ‘createButtonWithOptions’, ‘class’ => ‘Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => array ( ‘name’ => ‘Order #2966’, ‘price_string’ => 640, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://boldarms.com/wc-api/WC_Gateway_Coinbase/?callback_secret=6260436a05b4b458ff26e57f3832aaae54219941’, ‘custom’ => 2966, ‘success_url’ => ‘https://boldarms.com/checkout-2/order-received/2966?key=wc_order_5775fd2d9927e&return_from_coinbase=1’, ‘cancel_url’ => ‘https://boldarms.com/cart-2/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_5775fd2d9927e#038;order=wc_order_5775fd2d9927e&order_id=2966&redirect’, ), ), ), 3 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/woocommerce/includes/class-wc-checkout.php’, ‘line’ => 663, ‘function’ => ‘process_payment’, ‘class’ => ‘WC_Gateway_Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => 2966, ), ), 4 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/woocommerce/includes/class-wc-ajax.php’, ‘line’ => 472, ‘function’ => ‘process_checkout’, ‘class’ => ‘WC_Checkout’, ‘type’ => ‘->’, ‘args’ => array ( ), ), 5 => array ( ‘function’ => ‘checkout’, ‘class’ => ‘WC_AJAX’, ‘type’ => ‘::’, ‘args’ => array ( 0 => ”, ), ), 6 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-includes/plugin.php’, ‘line’ => 525, ‘function’ => ‘call_user_func_array’, ‘args’ => array ( 0 => array ( 0 => ‘WC_AJAX’, 1 => ‘checkout’, ), 1 => array ( 0 => ”, ), ), ), 7 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-content/plugins/woocommerce/includes/class-wc-ajax.php’, ‘line’ => 82, ‘function’ => ‘do_action’, ‘args’ => array ( 0 => ‘wc_ajax_checkout’, ), ), 8 => array ( ‘function’ => ‘do_wc_ajax’, ‘class’ => ‘WC_AJAX’, ‘type’ => ‘::’, ‘args’ => array ( 0 => ”, ), ), 9 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-includes/plugin.php’, ‘line’ => 525, ‘function’ => ‘call_user_func_array’, ‘args’ => array ( 0 => array ( 0 => ‘WC_AJAX’, 1 => ‘do_wc_ajax’, ), 1 => array ( 0 => ”, ), ), ), 10 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-includes/template-loader.php’, ‘line’ => 12, ‘function’ => ‘do_action’, ‘args’ => array ( 0 => ‘template_redirect’, ), ), 11 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/wp-blog-header.php’, ‘line’ => 19, ‘args’ => array ( 0 => ‘/home/realsign/public_html/boldarms/wp-includes/template-loader.php’, ), ‘function’ => ‘require_once’, ), 12 => array ( ‘file’ => ‘/home/realsign/public_html/boldarms/index.php’, ‘line’ => 17, ‘args’ => array ( 0 => ‘/home/realsign/public_html/boldarms/wp-blog-header.php’, ), ‘function’ => ‘require’, ), ), ‘previous’ => NULL, ‘http_code’ => 200, ‘response’ => ‘{“success”:false,”errors”:[“Cancel url is not a valid URL”],”button”:{“code”:”56fec0f1543343b075ddab5b23669fa0?,”uuid”:”a10eee77-ae85-5cb9-bc2d-af52e36f257c”,”type”:”buy_now”,”subscription?”:false,”repeat”:null,”style”:”buy_now_large”,”text”:”Pay With Bitcoin”,”name”:”Order #2966?,”description”:””,”custom”:”2966?,”callback_url”:”https://boldarms.com/wc-api/WC_Gateway_Coinbase/?callback_secret=6260436a05b4b458ff26e57f3832aaae54219941?,”success_url”:”https://boldarms.com/checkout-2/order-received/2966?key=wc_order_5775fd2d9927e\u0026return_from_coinbase=1?,”cancel_url”:”https://boldarms.com/cart-2/?cancel_order=true\u0026return_from_coinbase=1\u0026cancelled=1\u0026order_key=wc_order_5775fd2d9927e#038;order=wc_order_5775fd2d9927e\u0026#038;order_id=2966\u0026#038;redirect”,”info_url”:null,”auto_redirect”:false,”auto_redirect_success”:false,”auto_redirect_cancel”:false,”price”:{“cents”:64000.0,”currency_iso”:”USD”},”variable_price”:false,”choose_price”:false,”include_address”:false,”include_email”:false}}’, ))
What specific versions of Wordpress and Woocommerce? Need to spin up a test env to reproduce.
WordPress 4.5.3 WooCommerce Version 2.6.2 On 7/4/2016 5:22 PM, Alex Ianus wrote:
What specific versions of Wordpress and Woocommerce? Need to spin up a test env to reproduce.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coinbase/coinbase-woocommerce/issues/29#issuecomment-230366101, or mute the thread https://github.com/notifications/unsubscribe/ATWNJkcLdDBgtP2yNNI0MTRlC4_r_nS6ks5qSaPDgaJpZM4JBwgK.
Thank you, I was able to reproduce the error. It's definitely a bug in woocommerce and/or wordpress.
I've reported it to them directly: https://github.com/woothemes/woocommerce/issues/11355
In the meantime, you can install from the branch I linked to above as a workaround.
Thank you. I really appreciate your effort.
Mark Rudder 602-539-BOLD BOLDArms
On Jul 4, 2016, at 6:25 PM, Alex Ianus notifications@github.com wrote:
Thank you, I was able to reproduce the error. It's definitely a bug in woocommerce and/or wordpress.
I've reported it to them directly: woothemes/woocommerce#11355
In the meantime, you can install from the branch I linked to above as a workaround.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
What about what this guy said? Does it have a bearing on the issue?
_claudiosmweb https://github.com/claudiosmweb_commented13 hours ago https://github.com/woothemes/woocommerce/issues/11355#issuecomment-230376176
Not invalid, this returns a escape URL. Seehttps://developer.wordpress.org/reference/functions/esc_url/
If you need an "unescaped" URL, you can use|$order->get_cancel_order_url_raw()|.
Mark
On 7/4/2016 6:25 PM, Alex Ianus wrote:
Thank you, I was able to reproduce the error. It's definitely a bug in woocommerce and/or wordpress.
I've reported it to them directly: woothemes/woocommerce#11355 https://github.com/woothemes/woocommerce/issues/11355
In the meantime, you can install from the branch I linked to above as a workaround.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coinbase/coinbase-woocommerce/issues/29#issuecomment-230370085, or mute the thread https://github.com/notifications/unsubscribe/ATWNJj7_RiMoyxsMQuhE8lSMvfgOLvDTks5qSbKAgaJpZM4JBwgK.
This is fixed as of 2.1.3
Excellent.
Mark Rudder 602-539-BOLD BOLDArms
On Jul 5, 2016, at 5:47 PM, Alex Ianus notifications@github.com wrote:
This is fixed as of 2.1.3
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
I get the error "Sorry, but there was an error processing your order. Please try again or try a different payment method." when attempting to checkout. I've made sure I linked merchant/user via the V1 API and filled out my merchant profile. Is there anything I'm missing?
Here is the info on the order note:
` Error while processing coinbase payment: Coinbase_ApiException::__set_state(array( ‘message’ => ‘Cancel url is not a valid URL’, ‘string’ => ”, ‘code’ => 0, ‘file’ => ‘/var/www/html/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Rpc.php’, ‘line’ => 109, ‘trace’ => array ( 0 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Coinbase.php’, ‘line’ => 69, ‘function’ => ‘request’, ‘class’ => ‘Coinbase_Rpc’, ‘type’ => ‘->’, ‘args’ => array ( 0 => ‘POST’, 1 => ‘buttons’, 2 => array ( ‘button’ => array ( ‘name’ => ‘Order #1319’, ‘price_string’ => 80, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://www.mydomain.com/wc-api/WC_Gateway_Coinbase/?callback_secret=2f81359baae6d423cbd0681c860e24ecf4421920’, ‘custom’ => 1319, ‘success_url’ => ‘https://www.mydomain.com/checkout/order-received/1319?key=wc_order_57748828a0f39&return_from_coinbase=1’, ‘cancel_url’ => ‘https://www.mydomain.com/cart/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_57748828a0f39#038;order=wc_order_57748828a0f39&order_id=1319&redirect’, ), ), ), ), 1 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Coinbase.php’, ‘line’ => 208, ‘function’ => ‘post’, ‘class’ => ‘Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => ‘buttons’, 1 => array ( ‘button’ => array ( ‘name’ => ‘Order #1319’, ‘price_string’ => 80, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://www.mydomain.com/wc-api/WC_Gateway_Coinbase/?callback_secret=2f81359baae6d423cbd0681c860e24ecf4421920’, ‘custom’ => 1319, ‘success_url’ => ‘https://www.mydomain.com/checkout/order-received/1319?key=wc_order_57748828a0f39&return_from_coinbase=1’, ‘cancel_url’ => ‘https://www.mydomain.com/cart/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_57748828a0f39#038;order=wc_order_57748828a0f39&order_id=1319&redirect’, ), ), ), ), 2 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/coinbase-woocommerce/coinbase-woocommerce.php’, ‘line’ => 216, ‘function’ => ‘createButtonWithOptions’, ‘class’ => ‘Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => array ( ‘name’ => ‘Order #1319’, ‘price_string’ => 80, ‘price_currency_iso’ => ‘USD’, ‘callback_url’ => ‘https://www.mydomain.com/wc-api/WC_Gateway_Coinbase/?callback_secret=2f81359baae6d423cbd0681c860e24ecf4421920’, ‘custom’ => 1319, ‘success_url’ => ‘https://www.mydomain.com/checkout/order-received/1319?key=wc_order_57748828a0f39&return_from_coinbase=1’, ‘cancel_url’ => ‘https://www.mydomain.com/cart/?cancel_order=true&return_from_coinbase=1&cancelled=1&order_key=wc_order_57748828a0f39#038;order=wc_order_57748828a0f39&order_id=1319&redirect’, ), ), ), 3 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php’, ‘line’ => 663, ‘function’ => ‘process_payment’, ‘class’ => ‘WC_Gateway_Coinbase’, ‘type’ => ‘->’, ‘args’ => array ( 0 => 1319, ), ), 4 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php’, ‘line’ => 472, ‘function’ => ‘process_checkout’, ‘class’ => ‘WC_Checkout’, ‘type’ => ‘->’, ‘args’ => array ( ), ), 5 => array ( ‘function’ => ‘checkout’, ‘class’ => ‘WC_AJAX’, ‘type’ => ‘::’, ‘args’ => array ( 0 => ”, ), ), 6 => array ( ‘file’ => ‘/var/www/html/wp-includes/plugin.php’, ‘line’ => 525, ‘function’ => ‘call_user_func_array’, ‘args’ => array ( 0 => array ( 0 => ‘WC_AJAX’, 1 => ‘checkout’, ), 1 => array ( 0 => ”, ), ), ), 7 => array ( ‘file’ => ‘/var/www/html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php’, ‘line’ => 82, ‘function’ => ‘do_action’, ‘args’ => array ( 0 => ‘wc_ajax_checkout’, ), ), 8 => array ( ‘function’ => ‘do_wc_ajax’, ‘class’ => ‘WC_AJAX’, ‘type’ => ‘::’, ‘args’ => array ( 0 => ”, ), ), 9 => array ( ‘file’ => ‘/var/www/html/wp-includes/plugin.php’, ‘line’ => 525, ‘function’ => ‘call_user_func_array’, ‘args’ => array ( 0 => array ( 0 => ‘WC_AJAX’, 1 => ‘do_wc_ajax’, ), 1 => array ( 0 => ”, ), ), ), 10 => array ( ‘file’ => ‘/var/www/html/wp-includes/template-loader.php’, ‘line’ => 12, ‘function’ => ‘do_action’, ‘args’ => array ( 0 => ‘template_redirect’, ), ), 11 => array ( ‘file’ => ‘/var/www/html/wp-blog-header.php’, ‘line’ => 19, ‘args’ => array ( 0 => ‘/var/www/html/wp-includes/template-loader.php’, ), ‘function’ => ‘require_once’, ), 12 => array ( ‘file’ => ‘/var/www/html/index.php’, ‘line’ => 17, ‘args’ => array ( 0 => ‘/var/www/html/wp-blog-header.php’, ), ‘function’ => ‘require’, ), ), ‘previous’ => NULL, ‘http_code’ => 200, ‘response’ => ‘{“success”:false,”errors”:[“Cancel url is not a valid URL”],”button”:{“code”:”c4c457cf74d6c15847b45a91f97cfd8a”,”uuid”:”ccfd466c-356d-58a1-a5e8-59a28f64182d”,”type”:”buy_now”,”subscription?”:false,”repeat”:null,”style”:”buy_now_large”,”text”:”Pay With Bitcoin”,”name”:”Order #1319″,”description”:””,”custom”:”1319″,”callback_url”:”https://www.mydomain.com/wc-api/WC_Gateway_Coinbase/?callback_secret=2f81359baae6d423cbd0681c860e24ecf4421920″,”success_url”:”https://www.mydomain.com/checkout/order-received/1319?key=wc_order_57748828a0f39\u0026return_from_coinbase=1″,”cancel_url”:”https://www.mydomain.com/cart/?cancel_order=true\u0026return_from_coinbase=1\u0026cancelled=1\u0026order_key=wc_order_57748828a0f39#038;order=wc_order_57748828a0f39\u0026#038;order_id=1319\u0026#038;redirect”,”info_url”:null,”auto_redirect”:false,”auto_redirect_success”:false,”auto_redirect_cancel”:false,”price”:{“cents”:8000.0,”currency_iso”:”USD”},”variable_price”:false,”choose_price”:false,”include_address”:false,”include_email”:false}}’, ‘xdebug_message’ => ‘ ( ! ) Coinbase_ApiException: Cancel url is not a valid URL in /var/www/html/wp-content/plugins/coinbase-woocommerce/coinbase-php/Coinbase/Rpc.php on line 109 Call Stack # Time Memory Function Location 1 0.0001 249264 {main}( ) …/index.php:0 2 0.0001 249704 require( ‘/var/www/html/wp-blog-header.php’ ) …/index.php:17 3 0.0845 6411488 require_once( ‘/var/www/html/wp-includes/template-loader.php’ ) …/wp-blog-header.php:19 4 0.0845 6411536 do_action( ) …/template-loader.php:12 5 0.0849 6418992 call_user_func_array:{/var/www/html/wp-includes/plugin.php:525} ( ) …/plugin.php:525 6 0.0849 6419104 WC_AJAX::do_wc_ajax( ) …/plugin.php:525 7 0.0850 6420328 do_action( ) …/class-wc-ajax.php:82 8 0.0851 6421864 call_user_func_array:{/var/www/html/wp-includes/plugin.php:525} ( ) …/plugin.php:525 9 0.0851 6421968 WC_AJAX::checkout( ) …/plugin.php:525 10 0.0891 6560728 WC_Checkout->process_checkout( ) …/class-wc-ajax.php:472 11 0.1517 6981424 WC_Gateway_Coinbase->process_payment( ) …/class-wc-checkout.php:663 12 0.1598 7070576 Coinbase->createButtonWithOptions( ) …/coinbase-woocommerce.php:216 13 0.1598 7070976 Coinbase->post( ) …/Coinbase.php:208 14 0.1598 7071408 Coinbase_Rpc->request( ) …/Coinbase.php:69
‘, )) `
I appreciate your assistance.