Vipps not working
-
Hello, We are having problems with Vipps Checkout. We get the following error message on the payment page.
https://ibb.co/Nj3cb38The page I need help with: [log in to see the link]
-
This is a duplicate of your previous ticket I think? Can you please check your logs at your admin site at WooCommerce/status/logs, specifically the logs fatal-errors and woo-vipps for the exact time you are starting Vipps Checkout.
The reason you get this error is because your site can’t produce shipping options to Vipps. It could be for any number of reasons, so we need to see the log statements for the exact times this happens.
If your shipping options do not depend on the address of the customer (that is, you have fixed shipping), you can try to turn on the static shipping options, which will eliminate the callback. However, it is possible that your callback issue will affect the payment callback too, which may then cause order confirmations to be somewhat delayed.
2023-04-25T13:34:33+00:00 INFO Shipping callback is https://quintet.no/wc-api/vipps_shipping_details/?tk=07c131a09703f5c0a41f21c12f247174e86e0ecc3cbb28f5427e73663c5aea88&id=7671&callback=
2023-04-25T13:41:09+00:00 DEBUG Unknown Vipps Status: Array
(
[sessionId] => vxYtRfaoODepMmuyhiNCdw
[merchantSerialNumber] => 758701
[reference] => wooquintet7670
[sessionState] => SessionCreated
[shippingDetails] => Array
(
[firstName] => Sivert
[lastName] => Sletten
[email] => [email protected]
[phoneNumber] => 4741419898
[streetAddress] => Strimmelen 8
[postalCode] => 5097
[city] => BERGEN
[country] => NO
[address] => Array
(
[firstName] => Sivert
[lastName] => Sletten
[email] => [email protected]
[phoneNumber] => 4741419898
[streetAddress] => Strimmelen 8
[postalCode] => 5097
[city] => BERGEN
[country] => NO
) ) [billingDetails] => Array
(
[firstName] => Sivert
[lastName] => Sletten
[email] => [email protected]
[phoneNumber] => 4741419898
[streetAddress] => Strimmelen 8
[postalCode] => 5097
[city] => BERGEN
[country] => NO
) [orderId] => wooquintet7670
[userDetails] => Array
(
[firstName] => Sivert
[lastName] => Sletten
[email] => [email protected]
[phoneNumber] => 4741419898
[mobileNumber] => 4741419898
[userId] => 4741419898
) [transactionLogHistory] => Array
(
) [epaymentLog] =>
) 2023-04-25T13:41:09+00:00 ERROR Feil under henting av betalingsdetaljer fra Vipps for ordreid:7670
Kunne ikke lese ordrestatus hos Vipps
2023-04-25T13:41:09+00:00 DEBUG For ordre 7670 er ordrestatus hos Vipps pending
2023-04-25T13:44:39+00:00 ERROR Message in callback from Vipps for order 7671 User has not acted upon the payment
2023-04-25T13:44:39+00:00 DEBUG Vipps callback: H?ndterer ordre: 7671
2023-04-25T13:46:09+00:00 DEBUG Unknown Vipps Status: ArrayNote: this is just a test buy bacuse i cant really place the order without shipping method.
Thank you; in this log it seems that you are not receiving any shipping callback at all. Could you check your server logs for a POST to something like
POST /wc-api/vipps_shipping_details/?tk=...
If you cannot see any of these, they are most probably blocked by a firewall before they arrive at your server. If you see these, please check that they return a 200/202 value and not 403 or anything like that. If they return a 50x type error, please check the fatal errors log or your php log – something may be crashing.
To ensure that you are in fact not receiving any shipping details callbacks, you can add logging to this hook in your childthemes’ functions.php or in a plugin:
add_action('woo_vipps_shipping_details_callback', function ($result,$raw_post,$callback) { Vipps::instance()->log("Shipping details callback received with data " . print_r($result, true) . " raw data is $raw_post", 'DEBUG'); }, 10, 3);
This will log the callback event with the data passed to the “woo-vipps” log above.
You don’t need to complete any purchases, the failure happens when getting shipping alternatives so you can test it out simply by changing your address around.
If you *are* blocked by a firewall, it should be configured so as to allow
/wc-api/vipps_shipping_details/
.I’ve reviewed the server logs and there aren’t any security rules triggered for website quintet.no. I’ve checked the access logs and there are the following entries:
51.105.122.49 quintet.no – [27/Apr/2023:07:09:42 +0000] “POST /wc-api/wc_gateway_vipps/?tk=51512d103a82dcf3d839359610e875d73592073310e78766dedc5a735a8e9788&id=7690&callback=/v2/payments/wooquintet7690 HTTP/1.1” 202 5 “-” “-” | TLSv1.3 | 3.271 3.297 3.298 – 0 NC:000000 UP:-DT 51.105.122.49 quintet.no – [27/Apr/2023:07:13:01 +0000] “POST /wc-api/wc_gateway_vipps/?tk=d5d403742323596937624c143231542775df5f49439d397c398f1a32982b3618&id=7691&callback=/v2/payments/wooquintet7691 HTTP/1.1” 202 5 “-” “-” | TLSv1.3 | 2.363 2.384 2.384 – 0 NC:000000 UP:-DT 51.105.122.49 quintet.no – [27/Apr/2023:08:20:07 +0000] “POST /wc-api/wc_gateway_vipps/?tk=0c708f94b9bfa9dbb862797e8c895ce20a0e6b9440fc2f0b40ca70b5647a6892&id=7692&callback=/v2/payments/wooquintet7692 HTTP/1.1” 202 5 “-” “-” | TLSv1.3 | 3.075 3.099 3.099 – 0 NC:000000 UP:-DT
the POST requests are resulting in 202 response code which is Accepted status.
here I’ve uploaded our server logs:
https://we.tl/t-9XvydiYEX2I’ve updated a plugin and added a code in functions.php too ..
Plz provide the solution. ThanksThe WC api calls for which you are getting 202’s are the payment status callbacks. It’s great that you get these, but I don’t se any shipping callbacks there at all (they should look like
/wc-api/vipps_shipping_details/...
).Now if this are the logs from a Checkout or Express Checkout purchase, they will naturally not get any shipping alternatives, and thus they will fail. I assume then that you actually get as far as to the Vipps Checkout screen.
I assume also that you are not getting logged any “Shipping details callback received with data ..” to the woo-vipps log either, and that you are still getting log lines for what you send to Vipps as a shipping callback line to this log?
If you have any proxy installed in front of your website (including cloudflare or similar services), this is the next place to check; because either something is blocking these callbacks or Vipps never calls them. The last option is highly unlikely of course.
Since you actually *are* getting the payment callbacks, you can review if you could use “static” shipping; that is, if your shipping alternatives do not depend on the address of the user. If so, go to the settings for Vipps Checkout (and Express checkout) and select “Skru p? statisk frakt”/”Enable static shipping”. If this is possible, then the shipping alternatives will be calculated *before* you start Vipps Checkout, in which case the callback will never happen. This is also quite a bit faster.
If you cannot use static shipping, checking if a proxy is blocking the callbacks is the next step. Just to be sure, you may want to check the fatal-errors log too, but your access log should have had the shipping callback entries, and they aren’t coming thru.
You may also want to verify 100% your domain setup and so forth; so that the shipping callback URL is on the actual URL of your WP backend.
Can’t you guys directly check this bug on the site if i can provide access? Thanks
If the logs show that you are not getting the shipping callbacks at all, the problem is not with the plugin.
I’m sorry, but as a rule we don’t do debugging on sites we do not host ourselves except in very rare cases (among other things, we are afraid of causing changes we do not have the tools to fix; as well as issues with GDPR when given access to customer databases).
As I understand it, this used to work before moving hosts, so you will need to explore the difference between these two hosting environments. I have indicated some possible issues with front-ends not passing through the calls; these must be fixed before any problems with the plugin can be diagnosed. With the code I posted above, you should at least have the “shipping callback received” line in the logs.
- The topic ‘Vipps not working’ is closed to new replies.