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

#   Curl &amp; onPaymentNotification()

##

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22347](#22347) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  *[Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22347 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")* was created by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")*

Hello nicolas.

I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:

$ch = curl_init('[ www.4u2.co.il/index.php](https://www.4u2.co.il/index.php)');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS ,$params);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0); // DO NOT RETURN HTTP HEADERS
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)");
$result=curl_exec($ch);

note that $params are the paramters "notif_payment=banktransfer&amp;option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he" and some more parameter from the creditcard company.

Can the function work this way? I have tried few things and i can seem to run the function with this script..

Thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22349](#22349) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22349 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

$params should be appended to the URL like that so that they are in the $_GET and not in the $_POST :
$ch = curl_init('[ www.4u2.co.il/index.php?'.$params](http://www.4u2.co.il/index.php?'.$params));
Joomla probably doesn't like to not have anything in the $_GET...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22350](#22350) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22350 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Otherwise, yes, it's totally possible to do what you're trying to do.

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22361](#22361) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22361 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

great! but I changed the code as you said:

$ch = curl_init('[ www.4u2.co.il/index.php](https://www.4u2.co.il/index.php)?' . $params);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0); // DO NOT RETURN HTTP HEADERS
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)");
$result=curl_exec($ch);

When I run the file in the browser the function is called, but through the checkout the function is not working, i checked farther and the file is executed after the checkout, but somehow the function is not called there.
What may be the cause of that?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22363](#22363) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22363 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

The checkout of HikaShop does not call the function onPaymentNotification. That function is called when someone access the URL index.php?notif_payment=banktransfer&amp;option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he
So you're saying that at one point, you have some trace that the curl code was called but that the function was not called.
If it works when you access with the browser the file of your curl code, it should work when that file is called automatically.

I don't know what could be the cause, but you could look at the log file of your apache to see if you get the curl request. If not, it means that the problem is either the curl code, or the connection which cannot be established. If yes, it means that the problem is before the onpaymentnotification function, maybe something from joomla interfering, like SEF ?

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22409](#22409) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22409 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

The only errors I can see coming up all the time are:

(1).

[01-Aug-2011 11:53:56] PHP Warning: include(/home/ucoil/public_html/components/com_hikashop/controllers/index.php.php) [&lt;a href='function.include'&gt;function.include&lt;/a&gt;]: failed to open stream: No such file or directory in /home/ucoil/public_html/components/com_hikashop/hikashop.php on line 43
[01-Aug-2011 11:53:56] PHP Warning: include() [&lt;a href='function.include'&gt;function.include&lt;/a&gt;]: Failed opening '/home/ucoil/public_html/components/com_hikashop/controllers/index.php.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ucoil/public_html/components/com_hikashop/hikashop.php on line 43

(2).

[01-Aug-2011 11:58:59] PHP Warning: include(/home/ucoil/public_html/components/com_hikashop/controllers/calander.php) [&lt;a href='function.include'&gt;function.include&lt;/a&gt;]: failed to open stream: No such file or directory in /home/ucoil/public_html/components/com_hikashop/hikashop.php on line 43
[01-Aug-2011 11:58:59] PHP Warning: include() [&lt;a href='function.include'&gt;function.include&lt;/a&gt;]: Failed opening '/home/ucoil/public_html/components/com_hikashop/controllers/calander.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ucoil/public_html/components/com_hikashop/hikashop.php on line 43

I think the first one is coming before checkouts and the 2nd one is coming when completing the checkout.
I cannot seem to find what is that 2nd error..

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22411](#22411) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22411 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

I was thinking of the apache access log, not the php error log ( these error messages comes from it ).
These errors means that there is a request with the parameters: option=com_hikashop&amp;ctrl=calander or option=com_hikashop&amp;ctrl=index.php but that's not possible since these controllers do not exist.

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22421](#22421) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22421 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Oh, sorry.. I found this:

[01/Aug/2011:12:44:04 +0300] "GET /external/cardcom_request.php?**notif\_payment=banktransfer&amp;option=com\_hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he**&amp;terminalnumber=1000&amp;lowprofilecode=bed017bd-b13a-4a6d-82db-f115a2d1378f&amp;Operation=2&amp;ProssesEndOK=0&amp;DealRespone=0&amp;InternalDealNumber=849036&amp;TokenResponse=0&amp;Token=cc1da2b2-ca01-4053-b851-061c88316409&amp;TokenExDate=19900101&amp;CardValidityYear=2016&amp;CardValidityMonth=1&amp;CardOwnerID=2532546456&amp;InvoiceResponseCode=0&amp;InvoiceNumber=1886&amp;InvoiceType=1 HTTP/1.1" 200 658 "-" "-"

This is the page that runs the cURL to run the function with index.php?... (The page takes the parameters and cURL to index.php). As far as I know the 200 error is successful status code
and i think this is the cURL call:

[01/Aug/2011:12:44:04 +0300] "GET /index.php?notif_payment=banktransfer&amp;option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&amp;terminalnumber=1000&amp;lowprofilecode=bed017bd-b13a-4a6d-82db-f115a2d1378f&amp;Operation=2&amp;ProssesEndOK=0&amp;DealRespone=0&amp;InternalDealNumber=849036&amp;TokenResponse=0&amp;Token=cc1da2b2-ca01-4053-b851-061c88316409&amp;TokenExDate=19900101&amp;CardValidityYear=2016&amp;CardValidityMonth=1&amp;CardOwnerID=2532546456&amp;InvoiceResponseCode=0&amp;InvoiceNumber=1886&amp;InvoiceType=1 HTTP/1.1" 200 611 "-" "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)"

The only 404 i can see is:

[01/Aug/2011:12:41:33 +0300] "GET /en/index.php HTTP/1.1" 404 1417 "[ www.4u2.co.il/en/?ie=](https://www.4u2.co.il/en/?ie=)" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 BTRS26718 Firefox/3.6.12"

but i dont think it's any harm.
Any ideas?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22429](#22429) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22429 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

If I run the URL:
[ www.4u2.co.il/index.php?notif\_payment=ba...17bd-b13a-4a6d-82db-](https://www.4u2.co.il/index.php?notif_payment=banktransfer&option=com_hikashop&ctrl=checkout&task=notify&tmpl=component&lang=he&terminalnumber=1000&lowprofilecode=bed017bd-b13a-4a6d-82db-) f115a2d1378f&amp;Operation=2&amp;ProssesEndOK=0&amp;DealRespone=0&amp;InternalDealNumber=849036&amp;TokenResponse=0&amp;Token=cc1da2b2-ca01-4053-b851- 061c88316409&amp;TokenExDate=19900101&amp;CardValidityYear=2016&amp;CardValidityMonth=1&amp;CardOwnerID=2532546456&amp;InvoiceResponseCode=0&amp;InvoiceNumber=1886&amp;InvoiceType=1

in my browser, I don't get a 200 response. Instead, I get a 303 redirect response to:
[ www.4u2.co.il/he/?notif\_payment=banktran...17bd-b13a-4a6d-82db-](https://www.4u2.co.il/he/?notif_payment=banktransfer&option=com_hikashop&ctrl=checkout&task=notify&tmpl=component&lang=he&terminalnumber=1000&lowprofilecode=bed017bd-b13a-4a6d-82db-) f115a2d1378f&amp;Operation=2&amp;ProssesEndOK=0&amp;DealRespone=0&amp;InternalDealNumber=849036&amp;TokenResponse=0&amp;Token=cc1da2b2-ca01-4053-b851- 061c88316409&amp;TokenExDate=19900101&amp;CardValidityYear=2016&amp;CardValidityMonth=1&amp;CardOwnerID=2532546456&amp;InvoiceResponseCode=0&amp;InvoiceNumber=1886&amp;InvoiceType=1
which then gives a 200.

That's because of the SEF redirect of Joomla. And since your code probably don't handle the 303 response from the server, it just does not do anything.
The solution is to use the second URL in your code and not the first one. That way, you won't have the redirect response and your request will be processed by your onPaymentNotification function.

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22433](#22433) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22433 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Awesome! Finally it works!

Thank you so much!

Although i found a weird thing going on... after checkout complete Hikashop creates another empty order (sum = 0, no user and so on)

What causes Hikashop to create another order? ( i checked and onPaymentNotification() and onAfterOrderConfirm() only run once per order)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22435](#22435) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22435 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

HikaShop does not create 2 orders. It creates only one. I'm guessing that you maybe have some code which save the order without the order_id set in the object or something like that in your code?

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22439](#22439) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22439 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Thanks again!

Hikashop Order id came up wrong.

Thanks for everything, works flawlessly ![:)](/media/kunena/emoticons/8.png ":)")

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22455](#22455) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22455 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Hey again, i am trying to get the user class (Hikashop logged in user) at the onPaymentNotification() function (to save a in field something from the creditcard company).

it suppose to be something like that i think, but im not sure:

$userClass = hikashop_get('class.user');
$dbUser = $userClass-&gt;get(USER_ID);

is this thing will work, or is it done differently?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22456](#22456) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22456 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Yes. That's ok.

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22457](#22457) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22457 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Great! so how can i get the user id from the order?

I tried $dbOrder-&gt;user_id but it didnt work..

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22458](#22458) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22458 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

The variable is called order_user_id

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22463](#22463) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22463 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

good thats working, but i cant reach the custom fields i created.
I tried using the $dbUser-&gt;user_params-&gt;CUSTOM_FIELD but that failed..

Any other way to call custom fields?
And is there a way i can see the non custom fields name so i wont be asking silly questions?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 months ago [\#22473](#22473) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22473 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

You should be able to do that with $dbUser-&gt;CUSTOM_FIELD if you created custom fields of the table "user". However, you probably created custom fields of the table "address" which are in the address table, not in the user table.
So you need to load one of the addresses (a user can have several addresses) of the user from the address table. So you will have to make the query yourself.

Each custom field created will correspond to a new column on the corresponding table. If you created custom fields of the table address, you should see them in the address table structure.

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22529](#22529) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22529 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Yeah i know the understand the format, but i need this once per user so i created it at the user table.
I forgot the user didnt had value at the custom field so it came out empty. Thanks its working now ![:)](/media/kunena/emoticons/8.png ":)")

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

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 2 months ago [\#22534](#22534) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Curl &amp; onPaymentNotification()](/forum/4-how-to/22347-curl-onpaymentnotification#22534 "Hello nicolas.  I must know a thing before i can continue programming with Hikashop, I am trying to get onPaymentNotification() to run when i call cURL like this:  $ch = curl&#95;init('  www.4u2.co.il/index.php '); curl&#95;setopt($ch, CURLOPT&#95;POST, 1); curl&#95;setopt($ch, CURLOPT&#95;POSTFIELDS ,$params); curl&#95;setopt($ch, CURLOPT&#95;FOLLOWLOCATION, 1); curl&#95;setopt($ch, CURLOPT&#95;HEADER, 0); // DO NOT RETURN HTTP HEADERS curl&#95;setopt($ch, CURLOPT&#95;RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL curl&#95;setopt($ch, CURLOPT&#95;USERAGENT, &quot;Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)&quot;); $result=curl&#95;exec($ch);  note that $params are the paramters &quot;notif&#95;payment=banktransfer&amp;option=com&#95;hikashop&amp;ctrl=checkout&amp;task=notify&amp;tmpl=component&amp;lang=he&quot; and some more parameter from the creditcard company.  Can the function work this way? I have tried few things and i can seem to run the function with this script..  Thanks in advance.")*

Ok i found out another thing i cant figure out..

At one payment method i cant have the cart emptied at the end of the proccess (i need to empty the cart at the notification maybe), although not all payment must go to notification. i need 2 things:

1. Can i have the empty cart function for each payment method at onAfterOrderConfirm() or at onPaymentNotification()? (or do you have a better solution?)
2. Where is the cart been emptied now?

Thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIyMzQ3LWN1cmwtb25wYXltZW50bm90aWZpY2F0aW9uP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) 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.556 seconds

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

[](#top)
