[Skip to main content](#vessel-content)

#   new payment method

##

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago [\#117345](#117345) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#117345 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

From what you're saying the onPaymentNotification function is what you want to use.

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago [\#119365](#119365) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119365 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Hi nicolas thank you
in paypal method at onPaymentNotification function which code or line update order status to confirmed after when payment is ok

it's paypal onPaymentNotification function Code:

function onPaymentNotification(&amp;$statuses){ $pluginsClass = hikashop_get('class.plugins'); $elements = $pluginsClass-&gt;getMethods('payment','paypal'); if(empty($elements)) return false; $element = reset($elements); if(!$element-&gt;payment_params-&gt;notification){ return false; } $vars = array(); $data = array(); $filter = JFilterInput::getInstance(); foreach($_REQUEST as $key =&gt; $value){ $key = $filter-&gt;clean($key); if(preg_match("#^[0-9a-z_-]{1,30}$#i",$key)&amp;&amp;!preg_match("#^cmd$#i",$key)){ $value = JRequest::getString($key); $vars[$key]=$value; $data[]=$key.'='.urlencode($value); } } $data = implode('&amp;',$data).'&amp;cmd=_notify-validate'; if($element-&gt;payment_params-&gt;debug){ echo print_r($vars,true)."\n\n\n"; } $orderClass = hikashop_get('class.order'); $dbOrder = $orderClass-&gt;get((int)@$vars['invoice']); if(empty($dbOrder)){ echo "Could not load any order for your notification ".@$vars['invoice']; return false; } $order = new stdClass(); $order-&gt;order_id = $dbOrder-&gt;order_id; $order-&gt;old_status-&gt;order_status=$dbOrder-&gt;order_status; $url = HIKASHOP_LIVE.'administrator/index.php?option=com_hikashop&amp;ctrl=order&amp;task=edit&amp;order_id='.$order-&gt;order_id; $order_text = "\r\n".JText::sprintf('NOTIFICATION_OF_ORDER_ON_WEBSITE',$dbOrder-&gt;order_number,HIKASHOP_LIVE); $order_text .= "\r\n".str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('ACCESS_ORDER_WITH_LINK',$url)); if($element-&gt;payment_params-&gt;debug){ echo print_r($dbOrder,true)."\n\n\n"; } $mailer = JFactory::getMailer(); $config =&amp; hikashop_config(); $sender = array( $config-&gt;get('from_email'), $config-&gt;get('from_name') ); $mailer-&gt;setSender($sender); $mailer-&gt;addRecipient(explode(',',$config-&gt;get('payment_notification_email'))); if(!empty($element-&gt;payment_params-&gt;ips)){ $ip = hikashop_getIP(); $ips = str_replace(array('.','*',','),array('\.','[0-9]+','&#124;'),$element-&gt;payment_params-&gt;ips); if(!preg_match('#('.implode('&#124;',$ips).')#',$ip)){ $mailer-&gt;setSubject(JText::sprintf('NOTIFICATION_REFUSED_FOR_THE_ORDER','Paypal').' '.JText::sprintf('IP_NOT_VALID',$dbOrder-&gt;order_number)); $body = str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('NOTIFICATION_REFUSED_FROM_IP','Paypal',$ip,implode("\r\n",$element-&gt;payment_params-&gt;ips)))."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#ip').$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); JError::raiseError( 403, JText::_( 'Access Forbidden' )); return false; } } if(empty($element-&gt;payment_params-&gt;url))$element-&gt;payment_params-&gt;url='https://www.paypal.com/cgi-bin/webscr'; $url = parse_url($element-&gt;payment_params-&gt;url); if(!isset($url['query'])){ $url['query'] = ''; } if(!isset($url['port'])){ if(!empty($url['scheme'])&amp;&amp;in_array($url['scheme'],array('https','ssl'))){ $url['port'] = 443; }else{ $url['port'] = 80; } } if(!empty($url['scheme'])&amp;&amp;in_array($url['scheme'],array('https','ssl'))){ $url['host_socket'] = 'ssl://'.$url['host']; }else{ $url['host_socket'] = $url['host']; } if($element-&gt;payment_params-&gt;debug){ echo print_r($url,true)."\n\n\n"; } $fp = fsockopen ( $url['host_socket'], $url['port'], $errno, $errstr, 30); if (!$fp) { $mailer-&gt;setSubject(JText::sprintf('NOTIFICATION_REFUSED_FOR_THE_ORDER','Paypal').' '.JText::sprintf('PAYPAL_CONNECTION_FAILED',$dbOrder-&gt;order_number)); $body = str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('NOTIFICATION_REFUSED_NO_CONNECTION','Paypal'))."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#connection').$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); JError::raiseError( 403, JText::_( 'Access Forbidden' )); return false; } $uri = $url['path'].($url['query']!='' ? '?' . $url['query'] : ''); $header = "POST $uri HTTP/1.0\r\n". "User-Agent: PHP/".phpversion()."\r\n". "Referer: ".hikashop_currentURL()."\r\n". "Server: ".$_SERVER['SERVER_SOFTWARE']."\r\n". "Host: ".$url['host'].":".$url['port']."\r\n". "Content-Type: application/x-www-form-urlencoded\r\n". "Content-Length: ".strlen($data)."\r\n". "Accept: */"."*\r\n\r\n"; fwrite($fp, $header . $data); $response = ''; while (!feof($fp)) { $response .= fgets ($fp, 1024); } fclose ($fp); if($element-&gt;payment_params-&gt;debug){ echo print_r($header,true)."\n\n\n"; echo print_r($data,true)."\n\n\n"; echo print_r($response,true)."\n\n\n"; } $response = substr($response, strpos($response, "\r\n\r\n") + strlen("\r\n\r\n")); $verified = preg_match( "#VERIFIED#i", $response); if(!$verified){ if(preg_match("#INVALID#i", $response)){ $mailer-&gt;setSubject(JText::sprintf('NOTIFICATION_REFUSED_FOR_THE_ORDER','Paypal').'invalid transaction'); $body = JText::sprintf("Hello,\r\n A paypal notification was refused because it could not be verified by the paypal server")."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#invalidtnx').$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); if($element-&gt;payment_params-&gt;debug){ echo 'invalid transaction'."\n\n\n"; } }else{ $mailer-&gt;setSubject(JText::sprintf('NOTIFICATION_REFUSED_FOR_THE_ORDER','Paypal').'invalid response'); $body = JText::sprintf("Hello,\r\n A paypal notification was refused because the response from the paypal server was invalid")."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#invalidresponse').$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); if($element-&gt;payment_params-&gt;debug){ echo 'invalid response'."\n\n\n"; } } return false; } $completed = preg_match("#Completed#i", $vars['payment_status']); $pending = preg_match("#Pending#i", $vars['payment_status']); if (!$completed &amp;&amp; !$pending) { $body = str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('PAYMENT_NOTIFICATION_STATUS','Paypal',$vars['payment_status'])).' '.JText::_('STATUS_NOT_CHANGED')."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#status').$order_text; $mailer-&gt;setSubject(JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER','Paypal',$vars['payment_status'],$dbOrder-&gt;order_number)); $mailer-&gt;setBody($body); $mailer-&gt;Send(); if($element-&gt;payment_params-&gt;debug){ echo 'payment '.$vars['payment_status']."\n\n\n"; } return false; } echo 'PayPal transaction id: '.$vars['txn_id']."\n\n\n"; $order-&gt;history-&gt;history_reason=JText::sprintf('AUTOMATIC_PAYMENT_NOTIFICATION'); $order-&gt;history-&gt;history_notified=0; $order-&gt;history-&gt;history_amount=@$vars['mc_gross'].@$vars['mc_currency']; $order-&gt;history-&gt;history_payment_id = $element-&gt;payment_id; $order-&gt;history-&gt;history_payment_method =$element-&gt;payment_type; $order-&gt;history-&gt;history_data = ob_get_clean(); $order-&gt;history-&gt;history_type = 'payment'; $currencyClass = hikashop_get('class.currency'); $currencies=null; $currencies = $currencyClass-&gt;getCurrencies($dbOrder-&gt;order_currency_id,$currencies); $currency=$currencies[$dbOrder-&gt;order_currency_id]; $price_check = round($dbOrder-&gt;order_full_price, (int)$currency-&gt;currency_locale['int_frac_digits'] ); if($price_check != @$vars['mc_gross'] &#124;&#124; $currency-&gt;currency_code != @$vars['mc_currency']){ $order-&gt;order_status = $element-&gt;payment_params-&gt;invalid_status; $orderClass-&gt;save($order); $mailer-&gt;setSubject(JText::sprintf('NOTIFICATION_REFUSED_FOR_THE_ORDER','Paypal').JText::_('INVALID_AMOUNT')); $body = str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('AMOUNT_RECEIVED_DIFFERENT_FROM_ORDER','Paypal',$order-&gt;history-&gt;history_amount,$price_check.$currency-&gt;currency_code))."\r\n\r\n".JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#amount').$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); return false; } if($completed){ $order-&gt;order_status = $element-&gt;payment_params-&gt;verified_status; }else{ $order-&gt;order_status = $element-&gt;payment_params-&gt;pending_status; $order_text = JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#pending')."\r\n\r\n".$order_text; } if($dbOrder-&gt;order_status == $order-&gt;order_status) return true; $config =&amp; hikashop_config(); if($config-&gt;get('order_confirmed_status','confirmed')==$order-&gt;order_status){ $order-&gt;history-&gt;history_notified=1; } $order-&gt;mail_status=$statuses[$order-&gt;order_status]; $mailer-&gt;setSubject(JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER','Paypal',$vars['payment_status'],$dbOrder-&gt;order_number)); $body = str_replace('&lt;br/&gt;',"\r\n",JText::sprintf('PAYMENT_NOTIFICATION_STATUS','Paypal',$vars['payment_status'])).' '.JText::sprintf('ORDER_STATUS_CHANGED',$order-&gt;mail_status)."\r\n\r\n".$order_text; $mailer-&gt;setBody($body); $mailer-&gt;Send(); $orderClass-&gt;save($order); return true; }

I want use this method in my payment method for update order status automatically at database if payment is ok.
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago [\#119395](#119395) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119395 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

It's that line which saves the new order infos:
$orderClass-&gt;save($order);

The $order object contains the new status added with the line:
$order-&gt;order_status = $element-&gt;payment_params-&gt;verified_status;
and the order_id added with the line:
$order-&gt;order_id = $dbOrder-&gt;order_id;

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago -  13 years 2 months ago [\#119503](#119503) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119503 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

very well thank you nicolas
my bank send me referenceId with POST method I should save it in my database it's my bank Transaction Code
now which field of order table at database I can save it? it's necessary for save at database.

Last edit: 13 years 2 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 2 months ago -  13 years 2 months ago [\#119536](#119536) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119536 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Hi,

I think that you'll be able to save it by using this kind of code : Code:

$order-&gt;history-&gt;history_data = ob_get_clean().'/r/n'.$YourTransactionCode;

Note that you'll have to set your transaction code into the **$YourTransactionCode** variable.

Last edit: 13 years 2 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago [\#119686](#119686) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119686 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

thank you very much
now I should show my user payment result massage after payment
which code I can use at onPaymentNotification function for echo my bank massage for ok payment or not ok payment.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 2 months ago -  13 years 2 months ago [\#119689](#119689) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119689 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Hi,

I'll need more information about the payment process of this payment method, because if your customer is redirected to your notification URL after the payment your should use this kind of code :

- put this code at the begining of your function : Code:

$app =&amp; JFactory::getApplication(); $httpsHikashop = HIKASHOP_LIVE; global $Itemid; $url_itemid = ''; if (!empty($Itemid)) { $url_itemid = '&amp;Itemid=' . $Itemid; }

- If the payment status is OK : Code:

$return_url = $httpsHikashop.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;order_id='.$YOUR_ORDER_ID.$url_itemid; $app-&gt;enqueueMessage('YOUR SUCCESS MESSAGE'); $app-&gt;redirect($return_url);

- If the payment status isn't OK : Code:

$cancel_url = $httpsHikashop.'index.php?option=com_hikashop&amp;ctrl=order&amp;task=cancel_order&amp;order_id='.$YOUR_ORDER_ID.$url_itemid; $app-&gt;enqueueMessage('YOUR ERROR MESSAGE'); $app-&gt;redirect($cancel_url);

Note that you'll have to set your order ID into the **$YOUR\_ORDER\_ID** variable.

Last edit: 13 years 2 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago -  13 years 2 months ago [\#119693](#119693) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119693 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

thank you
with this code:
$app-&gt;enqueueMessage('YOUR SUCCESS MESSAGE');

can I show to my user bank TransactionCode payment code?

Last edit: 13 years 2 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 2 months ago [\#119694](#119694) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119694 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Yes by using something like : Code:

$app-&gt;enqueueMessage('YOUR SUCCESS MESSAGE WITH THE FOLLOWING TRANSACTION CODE : '. $YourTransactionCode);

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago [\#119833](#119833) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119833 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Hi Mohamed
My all payment process is:
I send to my bank this information: Code:

$vars = array( "merchantId" =&gt; $method-&gt;payment_params-&gt;merchantId, "amount" =&gt; $order-&gt;order_full_price, "paymentId" =&gt; $order-&gt;order_id, "customerId" =&gt; $order-&gt;order_user_id, "revertURL" =&gt; $return_url );

I can send it with use onAfterOrderConfirm function and connect with my bank.
after it my bank send me with POST method $resultCode and $referenceId ( it's my bank Transaction code )
and $paymentID ( it's my order_id ) to my $return_url
after bank send theme I should verify my costomer payment with use nusoap class and after verify if my $resultCode is ok
costumer payment is ok and save order at database and confirmed it.
please help me my problem in verify and save at database.
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago [\#119838](#119838) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119838 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

For the verification, you need to follow your payment method integration guide. We can't help you on that as it is relative to your payment gateway. Please ask them if you have trouble with that part.
For the order status saving to the database, it's quite easy. If you have the order_id in $paymentID, you can do like that: Code:

$class = hikashop_get('class.order'); $order = new stdClass(); $order-&gt;order_id = $paymentID; $order-&gt;order_status = 'confirmed'; $order-&gt;history = new stdClass(); $order-&gt;history-&gt;history_notified = 1; $class-&gt;save($order);

The following user(s) said Thank You: [cbadmin](/forum/user/15476-cbadmin "View cbadmin's Profile"), [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago [\#119840](#119840) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119840 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

thank you nicolas
Excuse me.
i have my bank verify sample but my problem is:
my bank send with method POST to $return_url now can I take theme at onPaymentNotification function?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago [\#119845](#119845) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119845 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Yes, since they are in the POST.
Like that for example: Code:

$paymentID = $_POST['paymentID'];

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago -  13 years 2 months ago [\#119851](#119851) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119851 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

thank you nicolas
can I show my user ok payment result massage and TransactionCode or not ok payment massage after payment?
Mr Mohamed say if my customer is redirected to notification URL use it Code:

$app =&amp; JFactory::getApplication(); $httpsHikashop = HIKASHOP_LIVE; global $Itemid; $url_itemid = ''; if (!empty($Itemid)) { $url_itemid = '&amp;Itemid=' . $Itemid; }

but my user use $return_url

Last edit: 13 years 2 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago [\#119878](#119878) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#119878 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

I can't say. It depends on how the payment gateway calls the payment notification function.
If it redirects the user's browser to the notification, then you can simply echo your text directly.

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago [\#120163](#120163) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#120163 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

thank you nicolas
how can I echo $paymentID = $_POST; or result code at onPaymentNotification function
Because I want to test Is I get them or not.
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 2 months ago [\#120174](#120174) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#120174 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

you should just echo your values like this : Code:

echo '&lt;br/&gt;My payment ID : '.$paymentID;

and then you'll be able to read this value through the **Payment log file** option via "Hikashop-&gt;System-&gt;Configuration-&gt;'main'".

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 2 months ago -  13 years 2 months ago [\#120316](#120316) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#120316 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Thank you mohamed
I use it but my log file is empty I think don't receive result code with $_POST in onPaymentNotification function
this is my onPaymentNotification function please check it for me. Code:

function onPaymentNotification(&amp;$statuses) { $pluginsClass = hikashop_get('class.plugins'); $elements = $pluginsClass-&gt;getMethods('payment', 'tejarat'); if(empty($elements)) return false; $element = reset($elements); $vars = array(); $data = array(); $filter =&amp; JFilterInput::getInstance(); /////////////////// My bank Verify ///////////////// $merchantId = $method-&gt;payment_params-&gt;merchantId; require_once(JPATH_ROOT .'/plugins/hikashoppayment/tejarat/arastejarat/nusoap.php'); $wsdl = "http://pg.sabapardazesh.net:9086/paymentGateway/services/merchant.wsdl"; $ns='http://tejarat/paymentGateway/definitions'; $resultCode = $_POST['resultCode']; $paymentId = $_POST['paymentId']; $referenceId = $_POST['referenceId']; echo '&lt;br/&gt; Bank Transaction code : '.$referenceId; // $client = new nusoap_client($wsdl, true); if (isset($_POST['resultCode'])) { $resultCode = $_POST['resultCode']; $referenceId = isset($_POST['referenceId']) ? $_POST['referenceId'] : 0; $paymentID = isset($_SESSION["PaymentID"]) ? $_SESSION['PaymentID'] : 0; if (($resultCode == 100)) { try { $client = new nusoap_client($wsdl, true); $err = $client-&gt;getError(); if ($err) { echo '&lt;h2&gt;Constructor error&lt;/h2&gt;&lt;pre&gt;' . $err . '&lt;/pre&gt;'; echo '&lt;h2&gt;Debug&lt;/h2&gt;&lt;pre&gt;' . htmlspecialchars($client-&gt;getDebug(), ENT_QUOTES) . '&lt;/pre&gt;'; } $params = array( "verifyRequest" =&gt; array( 'merchantId' =&gt; $merchantId, 'referenceNumber' =&gt; $referenceId) ); $client-&gt;setUseCurl(0); $client-&gt;soap_defencoding = 'UTF-8'; $client-&gt;decode_utf8 = true; $client-&gt;setEndpoint($wsdl); $result = $client-&gt;call("verify", $params); if ($client-&gt;fault) { echo '&lt;h2&gt;Fault (Expect - The request contains an invalid SOAP body)&lt;/h2&gt;&lt;pre&gt;'; print_r($result); echo '&lt;/pre&gt;'; } else { $err = $client-&gt;getError(); if ($err) { echo '&lt;h2&gt;Error&lt;/h2&gt;&lt;pre&gt;' . $err . '&lt;/pre&gt;'; } else { //////// Start save order ///////// $class = hikashop_get('class.order'); $order = new stdClass(); $order-&gt;order_id = $paymentID; $order-&gt;order_status = 'confirmed'; $order-&gt;history = new stdClass(); $order-&gt;history-&gt;history_notified = 1; $order-&gt;order_status = $element-&gt;payment_params-&gt;verified_status; $order-&gt;order_id = $dbOrder-&gt;order_id; $order-&gt;history-&gt;history_data = ob_get_clean().'/r/n'.$referenceId; $orderClass-&gt;save($order); return true; ///////// End save order ///////// } } echo '&lt;h2&gt;Request&lt;/h2&gt;&lt;pre&gt;' . htmlspecialchars($client-&gt;request, ENT_QUOTES) . '&lt;/pre&gt;'; echo '&lt;h2&gt;Response&lt;/h2&gt;&lt;pre&gt;' . htmlspecialchars($client-&gt;response, ENT_QUOTES) . '&lt;/pre&gt;'; echo '&lt;h2&gt;Debug&lt;/h2&gt;&lt;pre&gt;' . htmlspecialchars($client-&gt;getDebug(), ENT_QUOTES) . '&lt;/pre&gt;'; } catch (Exception $ex) { echo '&lt;h2&gt;Error&lt;/h2&gt;&lt;pre&gt;' . $ex-&gt;getMessage() . '&lt;/pre&gt;'; } } } ///////////// End bank verify ///////////////////// }

my bank send me with return url and $_POST result code and my return url is it: Code:

$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;order_id='.$order-&gt;order_id.$url_itemid;

I'm connect bank and payment and back to return url but I think can't receive result code.
thank you for your best support

Last edit: 13 years 2 months ago by [kaya](/forum/user/25605-kaya "View kaya's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 2 months ago -  13 years 2 months ago [\#120384](#120384) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#120384 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Your return URL should be: Code:

$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=tejarat';

Last edit: 13 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [kaya](/forum/user/25605-kaya "View kaya's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kaya](/forum/user/25605-kaya "View kaya's Profile")**
- [![kaya's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/vacation.jpg)](/forum/user/25605-kaya "View kaya's Profile")
- [ Offline](/forum/user/25605-kaya)

Less More

- Posts: 120
- Thank you received: 2
-
-
- [](http://arasjoomla.ir)
-

13 years 1 month ago [\#120822](#120822) by [kaya](/forum/user/25605-kaya "View kaya's Profile")  Replied by *[kaya](/forum/user/25605-kaya "View kaya's Profile")* on topic *[new payment method](/forum/4-how-to/1914-new-payment-method?start=40#120822 "Hi,  I need to use a new payment method for my shop, which is not supported in Hikashop yet. As I understand I would have to create a Joomla plugin of type ´hikashoppayment´. I have among others the Paypal payment method files (php and xml) as examples.  The payment method I want to implement is a Dutch method called 'iDEAL'. This is a name, and a protocol, which is used by all Dutch banks. With this method the user has to select payment method 'iDEAL', but after that also has to select a bank.  This bank selection should be part of the checkout process. But it seems that there is no way in the checkout process, or as part of the payment method selection, to ask the user for another choice. Is that correct? Or would it work to let onPaymentDisplay echo a select box?  Thanks! Ivar")*

Thank you nicolas
I use this: Code:

$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=tejarat';

but now have this error

Fatal error: Call to a member function save() on a non-object in plugins\hikashoppayment\tejarat\tejarat.php on line 385

please check my onPaymentNotification what is problem
thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5MTQtbmV3LXBheW1lbnQtbWV0aG9kP3N0YXJ0PTQwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.580 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
