Authorize.net SIM Relay Response URL

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121292

-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.5.1


What is the correct URL for the Relay Response URL ?

I am trying

https://www.DOMAIN.COM/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang=en


I am working with First Data who uses the Authorize.net standards. Any they are saying this URL is not correct.

Do I have the correct URL?

Thanks! -- Steven

Last edit: 11 years 2 months ago by intown.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 2 months ago #121309

https should be replaced by http if you don't have a SSL certificate on your website and www.DOMAIN.COM should be replaced by your actual domain name.
Besides that, that URL is correct.

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121323

Thanks for the confirmation.

Any suggestion on why the final part of the checkout is not working?
www.charitymobi.org/index.php?option=com...yout=show&Itemid=183
You can add a ticket to the cart and go through the checkout.

Here is what happens
I am directed to the payment page and use CC number and use an invalid card number for testing and click pay on the First Data payment page.
The first data page then directs me to a thankyou page I entered into the FD control panel.
The order remains as created, not cancelled or confirmed or any other status.

It seems like FD is not passing the information back to hikashop
Does the relay response page look correct?
www.charitymobi.org/index.php?option=com...pl=component&lang=en

Any thought on what could be happening?

Thanks! -- Steven

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 2 months ago #121341

I think that it's because your entered a thank you page in FD. Remove it and instead enter that URL in the return URL field of the authorize.net plugin.

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121751

Thanks for the reply. What should the URL be?

Is their a standard Hikashop Receipt page URL?
or
Can I create a standard Joomla Article that says thanks for your purchase? If it this option what should be displayed if the transaction is not approved.

Thanks! -- Steven

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 2 months ago #121755

The receipt page is automatically displayed by the authorize.net plugin in HikaShop. It's the file plugins/hikashoppayment/authorize/authorize_end.php

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121761

When I go through the payment process, I am always directed to the FD receipt page.

Here are the option I have for setting the FD Receipt page.
What option should I select?




If I have to enter a receipt page URL what should it be?

Thanks! -- Steven

Last edit: 11 years 2 months ago by intown.

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121787

I am not sure what is going on. Everything Appears to be set correctly. Now when I process a payment the payment shows up in the FD merchant reports but the orders are not being updated correctly and, the user is not being directed to the receipt page.

I did notice that when I use a card that is declined, the user/IP addresses in the Order History are the end user IP address.



When I use a card that is valid the order creation and payment status updates are different


Now I have started receiving emails from FD saying they there is a problem accessing the relay response URL, a few hours ago it was working fine.

Any thoughts on this?
Am I doing something wrong? I feel like I am spending way to much time on something that should be simple.

Thanks! -- Steven

Last edit: 11 years 2 months ago by intown.

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121836

This is a consolidation of the two threads
www.hikashop.com/forum/payment-methods/8...dating-hikashop.html

I think I found the email Jerome was talking about, the administrator notification, it had been unpublished on our shop.

Here is the error message

Hello,
An Authorize.net notification was refused because the response from the Authorize.net server was invalid. The hash received was d7da5f163c9425207XXXXXX90ea5fd8476 while the calculated hash was B358180C8081BF738A5DXXXX3C0DA98C. Please cehck that you're set the same md5 hash key in Authorize.net and the plugin


I have confirmed the same values are entered at the FirstData control panel and the hikashop authorize.net payment plugin

Have you seen the md5 hashes not match up before? Any suggestions?

Thanks! -- Steven

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121870

Okay I have been on the phone with First Data and think I have isolated the problem(s). It turns out to be 2 different issues.

Issue 1
The First Data x_MD5_Hash value has lowercase letters and the Authorize.net plugin x_MD5_Hash has upper case letters. Here is an example email I received from the authorize.net plugin.

Hello,
An Authorize.net notification was refused because the response from the Authorize.net server was invalid. The hash received was bc13982a8f3534f07a1234612b924243 while the calculated hash was BC13982A8F3534F07A1234612B924243. Please cehck that you're set the same md5 hash key in Authorize.net and the plugin


1. Which is the correct standard? uppercase or lowercase? If First Data is not following the Authorize.net standard and using lowercase letters, how do I modify authorize.php to use lowercase letters in the MD5 has for relay response hash?

I think I figured out how to display the hash as lower case

in authorize.php around line 441 there is this line
return strtoupper(md5($md5Hash.$login_id.$trans_id.$amount));
I modified it to
return md5($md5Hash.$login_id.$trans_id.$amount);
Is this the correct way to make the change?


Issue 2
Somewhere the amount is being truncated. When I have total dollar amount that has a non-zero number in the cent place (1.01 or 1.23) the x_MD5_Hash values are the same (except for the upper lowercase issue) When I have a total dollar amount that has a zero in the cents place (1.10 or 1.00) the x_MD5_Hash values between FD and the Authorize.net plugin are not even close.

If I have the total dollar amount as $1.10 this value is displayed in an email I get from first data
x_amount: 1.1

which leads me to believe that somewhere the x_amount is being truncated.

2. I looked at the code sending out the x_amount and noticed a round function based on the number of decimal places for the different currencies. Does the authorize.net plugin truncate the x_amount? Is it possible the round function is not working correctly?

Thanks! -- Steven

I really appreciate all the help.

Last edit: 11 years 2 months ago by intown.

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

  • Posts: 70
  • Thank you received: 4
11 years 2 months ago #121961

I think I solved issue 2.

It appears that hikashop is sending out dollar amounts without both decimal places.

In authorize.php I added sprintf to a couple of lines

line 190 is now

"x_amount" => sprintf("%01.2f", round($order->cart->full_total->prices[0]->price_value_with_tax,(int)$this->currency->currency_locale['int_frac_digits'])),

line 241 is now
$vars["x_line_item"][]=substr($product->order_product_code,0,30).'<|>'.substr(strip_tags($product->order_product_name),0,30).'<|><|>'.$product->order_product_quantity.'<|>'.sprintf("%01.2f", round($product->order_product_price,(int)$this->currency->currency_locale['int_frac_digits'])).'<|>'.$has_tax;

Does this seem like the correct way to fix Issue 2?

I would be really great if I could get a reply to the post.

The only way I have been able to get help with this topic is by starting a 2nd thread which is not the correct way.

Thanks! -- Steven

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #122203

Hi,

Can you just summarize what's is still not working ?
I am a little bit lost in your posts.

For your proposition of patch for the "sprintf", I guess that modification should be compatible with the Authorize.net server. But we have to check it to be sure.
I have to check if we still have one test account for Auithorize, if it's still valid, etc.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 7 months ago #152184

OK, seems I'm following behind in inhouse's foot steps. His posts have been helpful but I've run into something I didn't see in his posts.

On a test submission to FirstData, it now returns me to the HikaShjop site after payment is posted:



That message just quickly flashes and then I'm taking to the Thank You message:


The x_email line has the correct email in the FirstData email and I'm currently checking out as a Guest.

What I wondering is if it is in the FirstData control panel, it says current under Authorize.Net Protocol - Relay Response URL:
"This URL requires security review by E4 support staff. This process typically takes 1 business day however check back periodically to watch for the approval. Until approved, the Relay Response function cannot be performed for this payment page. Note: you can still save any changes made to this payment page."

Is the no email message what I might expect until the Relay Response URL is approved and preforming?

Just concerns me that a customer would see that and be worried about their order.

Customer order receipt seem to go out fine.

Using version 2.3.0 of HikaShop on PHP 5.4.26 and MySQL 5.5.36.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
10 years 7 months ago #152745

Hi,

The invalid notification message indicates that the MD5 hash entered in the Authorize.net payment method of HikaShop and the MD5 hash entered in your FirstData account manager settings are not the same.


The error with the email address would indicate that the "Payment notification email" option of the Emails section of the configuration doesn't contain any email address. I would recommend to add one there and that should remove the error.

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

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 7 months ago #152753

Thanks Nicolas,

You were right with the error with the email address - I only set the from and reply to addresses.
I set that and that part of the error went away.

Now just down to the invalid response. I wasn't setting it because I couldn't find the value. But after some digging I found what they call the "Response Key" in FirstData's Payment Page Settings -> Security settings. I think this is MD5 hash but still not working.

I set it (and even reset it) but get the following (in an email from HikaShop) titled "Authorize.net payment notification refused:invalid response":

An Authorize.net notification was refused because the response from the Authorize.net server was invalid. The hash received was 723002a876c2cdb15d70dea132179b44 while the calculated hash was 7d3bfe56ef218867b5a7ae450aa1edd1. Please cehck that you're set the same md5 hash key in Authorize.net and the plugin


It doesn't appear to be a case issue like intown had. I just isn't matching up.

Could this be because I'm entering a test CC number (4111 1111 1111 1111)? I hate to test with a real CC but their account isn't setup to permit test mode unfortunately. I would think First Data would reject that test # (gets past the MOD10 check) during checkout but it lets it through. FirstData says "201 - Invalid CC Number " in their control panel's transaction report. I want to rule that out before trying a real card to test with.

Thanks as always.

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

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 7 months ago #152779

OK, I got this working I believe now - at least it sends back the correct hash and informs the cart the payment was declined (because of the test CC # above). I think I'm good now as far as HikaShop goes.

Sadly it kicks back to a "Thank you for your purchase." page on HikaShop.
It would be nice if it displayed the declined (other than that little flash by).

I think I need to get First Data's payment form to not accept a declined or invalid card to begin with. Their control panel leaves a lot of be desired . I really wish the client would use Authoirize.Net or PayPal...I know those work fine.

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

Time to create page: 0.107 seconds
Powered by Kunena Forum