Beanstream success returns to blank page

  • Posts: 3
  • Thank you received: 0
8 years 5 months ago #243373

Description:
After a live transaction at Beanstream the customer is returned to a blank page at the store site. The page that's being called is beanstream_params_u.php with a query string. In the Joomla backend Hikashop still shows the order as "created" and not "confirmed" and no emails are sent. The customer still has the product in their shopping cart. At Beanstream it shows the transaction was successful.

General Info:
Joomla 3.48
Hikashop 2.6.2 Business
PHP 5.5.36
I have a Beanstream developer account to test with and have access to my client's Beanstream live account. Although there look to be minor differences betweeen these two accounts the essential information is in place as per the Hikashop Beanstream doc. The Payment Gateway is set the same for both accounts as is the Hash Key. In Joomla/Hikashop the correct Merchant Number is in place depending whether I'm testing with my developer account or using the client's live account

Tests:
Running a transaction through my Beanstream developer account everything works perfect.
Running a transaction through the client's live Beanstream account results in the blank page.

Logs:
For each test I kept a clean log with only that transaction in it. When I run the test through my developer account the log is small and starts with an array of return variables followed by a stdClass Object. When I run the test on the live account the log is about 19Kb larger. It starts off with the same array followed by the stdClass Object but after that there's a "string" with the complete query string and below that it says "Hash error 5a6be4c60f0de5561fd5e2ffb84086b8 - 0bd1d590363eea327fa686268c14369e". After that it repeats the intial array but this time there are are number of new elements that start with underscores and that is followed by a much larger stdClass Object with way more info than the first. I've attached the two logs.

I am also seeing a small difference in the two initial arrays. For live there is an added element "riskScore", this is not there when processing through the developer account. Don't know if that would stop things if the plugin is expecting only specific return values.

I'm assuming this is a Beanstream issue that the live account isn't returning the correct information, or maybe too much. But maybe the payment plugin needs to be fault tolerant. Just guessing here. Any insights would be much appreciated.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13373
  • MODERATOR
8 years 5 months ago #243396

Hi,

It's not about what beanstream returns. The plugin do has a whitelist of parameters and only take into account the relevant parameters.
You can see before the line "Hash error 5a6be4c60f0de5561fd5e2ffb84086b8 - 0bd1d590363eea327fa686268c14369e"
the parameters used for the calculation of the hash and the riskScore is not used.
This leads to the most probable conclusion that the hash key you entered in the payment method doesn't correspond to the hash key that is used by beanstream to generate the hash sent to HikaShop.
If you want to be more fault tolerant, you can turn off the hash method of the payment method, but then a hacker couldn't confirme orders by himself without paying, so you would have to be careful that you do get the payments before processing the orders.
What I would do is contact beanstream's tech support with the hash error, the string of parameters used to generate the hash and the hash key you configured in HikaShop.
They should be able to check on they end what is wrong (the hash key used, or the parameters used (but they seem fine as far as I can see), or something else).

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
8 years 5 months ago #243416

Thank you for your response. I've tried turning off the Hash validation in Beanstream by unchecking the boxes and ran another live test. Unfortunately this failed as well. The log shows almost the same info except no "hashValue" is returned and the "Hash error" itself is different. This time instead of two strings separated by a dash "-" there is only one string preceded by a dash.

Did you mean I should also delete the Hash entirely and/or delete it within the actual payment plugin configuration?

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13373
  • MODERATOR
8 years 5 months ago #243431

Hi,

You need to set the "hash method" to "none" and remove the "hash key" from the payment method in that case.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
8 years 5 months ago #243498

That worked almost, it just needed a small modification. Setting the hash method to none and leaving the hash key blank gives this error message at checkout...

You have to configure a hash on the Beanstream plugin payment parameters first

...What worked was setting the hash method to none and leaving the original hash key in place (I'm guessing any string would do as long as something was there). After that things worked as expected, was able to do a live transaction, returned to the site with the correct thank you message, cart contents were cleared, emails sent, Hikashop admin shows the order as confirmed, Perfect!!

As I said initially I was assuming this was an error at Beanstream's end, and it looks that way. There must be a difference between the developer account and a live one. Have been in touch with them, will make them aware of the hash key problem.

Thanks for your help.

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum