Guest
07 Mar 2012 20:26

Hi, I'm using both of the components and it looks like they each require my settings on 2CO to be different for the IPN. What should I do?

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
08 Mar 2012 00:09

That is complicated question, long time discussed with 2CO. You know we are 2CO partners after 10 years of working on developing 2CO integration. We and may other 2CO authorized developers were raising this issue. Right now there is no good solution for that.

We do have option to override approve URL on the fly so it is differ for every Joomla extension. But we cannot override INS URLs. What you can do is to try to enable plugin and do payment and see what it will end with. Perhaps, payment will go through easily.

But if it is not, create temporary admin user on 2CO and Joomla admin and post here in private comment. We will see how this issue can be resolved.


Guest
06 Feb 2013 19:21

I wrote a custom php script to redirect the ipn post variable to either cbsubs or Hikashop. I'm not getting order to change however. I'm wondering if my "order statuses" in Hikashop need to be configured in a certain way.


Guest
06 Feb 2013 19:57

I realized I needed an order status of "confirmed" for it to work.


Sergey
Total posts: 13,748
06 Feb 2013 21:53

Works?


Guest
07 Feb 2013 20:13

Well, not totally, so I revised my approach and this solution looks like it works. You need the lastest open source GPL version of cbsubs, so that you can modify one of the files.

Here's a link to the post: http://www.joomlapolis.com/forum/256-cbsubs-support/219549-cbsubs-ipn-url-conflict-with-online-shop-ipn-url

I added this code to line 111 of cbpaidsubscriptions.twocheckout:

$hikashop_url = " http://worsleyinstitute.com/index.php?option=com_hikashop& ;ctrl=checkout&task=notify&notif_payment=pay2co&tmpl=component";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $hikashop_url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);

$output = curl_exec($ch);

$info = curl_getinfo($ch);

curl_close($ch);

This simply passes $postdata to the hikashop ipn url.


Sergey
Total posts: 13,748
07 Feb 2013 22:27

I see. So you have single INS receiver file and there you redirect INS to different extensions depending on what was purchased? That is good!


Guest
08 Feb 2013 11:42

I tried having a single ins receiver file, but I had some problems with configuring the components with it. With this solution, you use the cbsubs ins url and settings on 2CO. Then the cbsubs ins file with the modification (above) will pass the ins postdata to hikashop. If you need to send to another component you could duplicate the above code with a different url. With this setup the ins gets sent to hikashop every time. But, I figure it would be rejected by hikashop if it's not an ipn related to the shop, so I think it's not necessary to determine what what the payment was for.


Sergey
Total posts: 13,748
09 Feb 2013 07:45

Good solution :) I like it.

Powered by Cobalt