Authorize.net Direct Post Method (DPM)?

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #187085

Joomla version: 3.3.6
Hikashop version: HikaShop Business: 2.3.5

HI! I know this is a REALLY old thread, but I wanted to find out where the Authorize.net DPM development currently stands? Its shown as an API option in the plugin but selecting the DPM option does not appear to use the DPM method. It actually seems to redirect to the SIM method.

Thanks for any insight you can provide!

-Bridgette


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
9 years 9 months ago #187087

Hi,

Did you look at the plugin Authorize in the HikaShop payment plugins interface ?

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: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #187167

Hi Jerome -

Yes, sorry for not being clearer. I was referring to the "HikaShop Authorize.net payment plugin". I see the DPM method as an API option in the "HikaShop Authorize.net payment plugin" but when DPM is selected the frontend result is a redirect to an Authorize.net-hosted payment form.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
9 years 9 months ago #187220

Hi,

DPM has been added in May 2012.
In DPM mode, the plugin adds an iframe in his "end" page.

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: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #187345

Is there a certain way the checkout workflow needs to be configured for that result? When I select the DPM API in the plugin, the result on the frontend is a redirect to authorize.net at the end step.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
9 years 9 months ago #187353

Hi,

There is no configuration to do in the checkout.
The "authorize_end" view starts with this code

<?php if ($this->payment_params->api == 'dpm' && @$this->payment_params->iframe){
		$url=urlencode(base64_encode(json_encode($this->vars)));
	?>
	<iframe name="frame" scrolling="auto" height="1000" width="660" Frameborder="no" src="<?php echo $this->vars["x_relay_url"].'&iframe='.$url;?>"></iframe>
<?php return;
} ?>
And in the onAfterOrderConfirm function of the plugin, the variable "iframe" is set to "1" if the API is not "AIM".

So unless you modified or create an override for the view, the iframe should be displayed.

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: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #188120

We haven't modified the plugin or created any custom views.

I'll dig into the code and figure out why it isn't working and let you know what I find.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 9 years 9 months ago by 3by400.
The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #188763

Originally the end step was redirecting to A.net and using the SIM method even though I have DPM configured in the plugin.

I changed this:

<?php if ($this->payment_params->api == 'dpm' && @$this->payment_params->iframe ){
		$url=urlencode(base64_encode(json_encode($this->vars)));
	?>

To this:
<?php if ($this->payment_params->api == 'dpm'){
		$url=urlencode(base64_encode(json_encode($this->vars)));
	?>

And, now the end step is not redirecting, but instead its correctly trying to load the iframe on the page. The issue now is that the iframe is empty.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Attachments:
Last edit: 9 years 8 months ago by 3by400.

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
9 years 9 months ago #188766

Hi,

Just for the notice ; you made an assignation in a IF instead of testing the variable.
So, your modification might put an iframe but I don't think that it is the most appropriate fix.
About the empty iframe ; you should use the browser inspector in order to check the iframe size and the iframe target link.

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: 195
  • Thank you received: 13
  • Hikashop Business
9 years 9 months ago #188850

Hi Jerome -

Thank you for your response. Ok, ok bad example. My point is that this isn't resolving to true:
- @$this->payment_params->iframe.

I do see in authorize.php that if the api is not == 'aim' then iframe is set to 1, but in authorize_end its not 'true'.

Also, I did actually review the iframe code via my browser inspector (ie, firebug). The target URL looks correct, but the form is not populated in the body of the frame.

target URL:

index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang=en&Itemid=465&iframe=long_encoded_gobbidy_gook

iframe size: 660 x 1000


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 9 years 9 months ago by 3by400.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 8 months ago #189718

Hello,
We just fixed an issue regarding the Authorize.net DPM mode, you should edit the "plugins\hikashoppayment\authorize\autorize.php" file and change these lines :

else{
$this->payment_params->iframe = 1;
$vars = $this->_loadStandardVars($order);
$viewType = 'end';
$vars["x_show_form"] = 'PAYMENT_FORM';
if(@$this->payment_params->notification){
	$vars["x_relay_response"] = 'TRUE';
	$vars["x_relay_url"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang='.$this->locale.$this->url_itemid;
}
$vars["x_fp_sequence"] = $vars["x_invoice_num"];
$vars["x_fp_timestamp"] = time();
$vars["x_fp_hash"] = hash_hmac("md5", $vars["x_login"] . "^" . $vars["x_fp_sequence"] . "^" . $vars["x_fp_timestamp"] . "^" . $vars["x_amount"] . "^" . $vars["x_currency_code"], $this->payment_params->transaction_key);
if(!empty($this->payment_params->x_logo_url)){
	$vars['x_logo_url']=$this->payment_params->x_logo_url;
}
$this->vars = $vars;
}
By :
else{
$vars = $this->_loadStandardVars($order);
$viewType = 'end';

$this->payment_params->iframe = 1;

$vars["x_show_form"] = 'PAYMENT_FORM';
if(@$this->payment_params->notification){
	$vars["x_relay_url"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang='.$this->locale.$this->url_itemid;
	$vars["x_relay_response"] = 'TRUE';
}
if($this->payment_params->api == 'dpm') {
	$vars["x_relay_url"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&x_po_num=' . (int)$order->order_id . '&tmpl=component&lang='.$this->locale.$this->url_itemid;
}
$vars["x_fp_sequence"] = $vars["x_invoice_num"];
$vars["x_fp_timestamp"] = time();
$vars["x_fp_hash"] = hash_hmac("md5", $vars["x_login"] . "^" . $vars["x_fp_sequence"] . "^" . $vars["x_fp_timestamp"] . "^" . $vars["x_amount"] . "^" . $vars["x_currency_code"], $this->payment_params->transaction_key);
if(!empty($this->payment_params->x_logo_url)){
	$vars['x_logo_url']=$this->payment_params->x_logo_url;
}
$this->vars = $vars;
}

The following user(s) said Thank You: 3by400

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
9 years 8 months ago #189860

Thank you Mohamed and Jerome -

We will apply these changes and report back!


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
9 years 8 months ago #190115

I've posted our update to Kevin's (essential) forum post. We are working with Kevin to assist him with his Joomla and HikaShop configuration.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

Time to create page: 0.063 seconds
Powered by Kunena Forum