checkoutfinland / checkout-finland-for-woocommerce Goto Github PK
View Code? Open in Web Editor NEWCheckout Finland payment service for WooCommerce
Home Page: https://www.checkout.fi
License: MIT License
Checkout Finland payment service for WooCommerce
Home Page: https://www.checkout.fi
License: MIT License
Describe the bug
Guzzlehttp/guzzle is on version 6.x.x wich conflicts with other plugin that have a newer version of Guzzlehttp/guzzle 7.3.0 causing fatal error.
To Reproduce
Any plugin with a newer version of Guzzle, for example plugins using google/apiclient v2.10.1 sometimes cause fatal error with Checkout -plugin.
Error Code
Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/guzzlehttp/guzzle/src/functions.php:61 Stack trace: #0 /srv/asteriski.fi/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler() #1 /srv/asteriski.fi/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create() #2 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient/src/Client.php(1190): GuzzleHttp\Client->__construct() #3 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient/src/Client.php(1143): Google\Client->createDefaultHttpClient() #4 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient/src/Client.php(411): Google\Client->getHttpClient() #5 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient/src/Client.php(891): Google\Client->authorize() #6 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient/src/Service/Resource.php(238): Google\Client->execute() #7 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/google/apiclient-services/src/Calendar/Resource/Events.php(271): Google\Service\Resource->call() #8 /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/wp-asteriski-calendar.php(94): Google\Service\Calendar\Resource\Events->listEvents() #9 /srv/asteriski.fi/wp-includes/class-wp-widget.php(393): Next_Events->widget() #10 /srv/asteriski.fi/wp-includes/widgets.php(831): WP_Widget->display_callback() #11 /srv/asteriski.fi/wp-content/themes/wp-asteriski-theme/sidebar.php(6): dynamic_sidebar() #12 /srv/asteriski.fi/wp-includes/template.php(770): require_once('...') #13 /srv/asteriski.fi/wp-includes/template.php(716): load_template() #14 /srv/asteriski.fi/wp-includes/general-template.php(136): locate_template() #15 /srv/asteriski.fi/wp-content/themes/wp-asteriski-theme/index.php(136): get_sidebar() #16 /srv/asteriski.fi/wp-includes/template-loader.php(106): include('...') #17 /srv/asteriski.fi/wp-blog-header.php(19): require_once('...') #18 /srv/asteriski.fi/index.php(17): require('...') #19 {main} thrown in /srv/asteriski.fi/wp-content/plugins/wp-asteriski-calendar/vendor/guzzlehttp/guzzle/src/functions.php on line 61
The default state of an order after a successful order is "processing". This is problematic for WooCommerce shops that do not require any kind of processing for the order after the payment is completed. For example, shops with digital downloads might not need any processing on behalf of the shop administrator. In this case, the order should be "completed" after the payment.
This feature could be done with a select box on the payment gateway settings page.
I have set up logging in plugin settings. There is no log file in wp-content/uploads/wc-logs. Instructions say: "This enables logging all payment gateway events." I guess it should be populating with data when order has been made.
Describe the bug
The purchase process fails when adding a new card as a payment method when purchasing a WooCommerce Subscriptions product. The card form is shown as excepted, but returning to the shop's success handler produces the following error:
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://api.checkout.fi/tokenization/a20ab661-7ca0-4223-85b2-ec56b47eaecd` resulted in a `422 Unprocessable Entity` response: {"status":"error","message":"Unexpected response code: 200.118"} in /data/wordpress/htdocs/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /data/wordpress/htdocs/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /data/wordpress/htdocs/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/promises/src/FulfilledPromise.php(39): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /data/wordpress/htdocs/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Fu in /data/wordpress/htdocs/wp-content/plugins/op-payment-service-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
To Reproduce
Use the following versions:
Activate the payment gateway and use the test credentials. Create a subscriptions product on the admin side. Log out and do not use an existing user on the front-end. Add the subscriptions product to cart. Go to checkout and add the required customer information. Try to purchase the product by adding a new card payment method.
Expected behavior
A new card payment method is added for the current user and the subscription product is successfully purchased using this newly added method.
Additional context
The error was produced on a local machine using the test shop credentials and both Visa and Mastercard test credentials for the card payment. Debug log contains the following:
DEBUG OpMerchantServices: check_checkout_response, no status or reference found for reference:
URL path for the error:
/op-payment-service/card-success/checkout/?checkout-account=375917&checkout-algorithm=sha256&checkout-method=GET&checkout-status=ok&checkout-tokenization-id=f39afacf-91d0-409c-a5b7-e904db6bbca0&signature=8181725b76012643aa4a292bf9fa26ece45e336fa7780b57b2982037ee913add
I installed and activated the plugin but it is not showing up in WooCommerce Payment methods. The installation and activation worked without errors. My current setup is:
PHP: 7.2.19
WordPress: 5.2.1
WooCommerce: 3.6.4
CheckoutFinland plugin: 1.1.3
When user tries to pay, result is only error.
Wordpress 5.5.2
WooCommerce 3.7.0
Plugin 1.1.3
Server logs show following error.
AH01071: Got error 'PHP message: PHP Warning: Division by zero in /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-content/plugins/woocommerce-checkout-finland-gateway/src/Gateway.php on line 1133\nPHP message: PHP Fatal error: Uncaught Error: Call to a member function getName() on null in /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-content/plugins/woocommerce-checkout-finland-gateway/src/Gateway.php:712\nStack trace:\n#0 /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(924): CheckoutFinland\WooCommercePaymentGateway\Gateway->process_payment(2691)\n#1 /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1124): WC_Checkout->process_order_payment(2691, 'checkout_finlan...')\n#2 /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(462): WC_Checkout->process_checkout()\n#3 /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-includes/class-wp-hook.php(286): WC_AJAX::checkout('')\n#4 /var/www/vhosts/mavacom.fi/cross4wd.mavacom.fi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)\n#5 /var/www/vhosts/mavacom.fi/cross4wd.mava...\n', referer: https://cross4wd.mavacom.fi/kassa/
Hi,
just to let you know, I recieved the following error on a webstore using the 1.1.6 version of this plugin.
PHP Fatal error: Uncaught Error: Call to a member function getName() on null in path/to/wp-content/plugins/woocommerce-checkout-finland-gateway/src/Gateway.php:712
Stack trace:
#0 path/to/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(924): CheckoutFinland\WooCommercePaymentGateway\Gateway->process_payment(some_id)
#1 path/to/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1124): WC_Checkout->process_order_payment(some_id, 'checkout_finlan...')
#2 path/to/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(462): WC_Checkout->process_checkout()
#3 path/to/wp-includes/class-wp-hook.php(286): WC_AJAX::checkout('')
#4 path/to/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#5 path/to/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#6 path/to/wp- in path/to/wp-content/plugins/woocommerce-checkout-finland-gateway/src/Gateway.php on line 712
I've now updated the plugin to 1.1.7 and after RTFM'ing did the composer install inside the plugin dir after manual install. I'll report back, if the above error persists.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.