We're trying to write our own payment gateway plugin for store, using version 1.6.5

The payment gateway in question is the Croatian Webteh form (off-site) and we're having an issue with the landing page after the card gets processed on their server and the order payment status info gets sent back.

Webteh gives us the following parameters in GET after a succesful payment:

?approval_code=938745&authent ication=&cc_type=master&currency=HRK&custom_params=&digest=9b345418cb4dd64a23f7459230079ba82d6e6331&enrollment=N&language=hr&order_number=24&response_code=0000

Where exactly (route) does store handle returns from the payment gateway? Webteh has a fixed url in their administration panel where it redirects successful payments - what should we redirect to? Our webshop is set up at http://www.example.com/webshop/. Should it be /webshop/checkout3?

We can't seem to figure out where purchase_return method is called.


1 Answer 1


I'm not familiar with the Webteh API specifically, but usually it is possible to specify a custom return URL for each payment.

With Store v1 (and CI-Merchant), you should set the return URL to the value of $this->param('return_url'), as you can see in the PayPal Express gateway. This URL will then trigger Store's payment return code, and pass control to the purchase_return() method on your gateway.

Note that in Store v2, Omnipay is used instead of CI-Merchant, which uses a similar but slightly different approach.

  • Ok so far we've got to this: found out that the url which is supposed to trigger payment return processing is something like this: site.com/?ACT=43&H=7d766c24e353d0978e1a0ea8ca7eaeb7 ACT number 43 in database is: class - Store method - act_payment_return So - that url will trigger action and load merchant.php that loads payment gateway 'drivers'. Problem is, var_dumping $driver variable when Merchant instantiates returns nothing. Default settings are fine, but my merchant_webteh_form plugin never loads method purchase_return, so nothing really happens.
    – Dovla
    Commented Mar 8, 2014 at 21:11
  • Only thing that shows up on the screen when opening that url is 'TEST' (no html whatsoever, just string TEST). Tried toggling test-mode everywhere, same output. Then tried to find die("TEST") or echo "TEST"; die;, but ack returned nothing that would output such string. I might be wrong here, but tried ack and netbeans search, came up with nothing.
    – Dovla
    Commented Mar 8, 2014 at 21:12
  • Nothing in the Store code would output TEST, so that must either be coming from your code or Webteh directly. Can you verify that the H parameter matches the correct transaction with the correct payment gateway? That URL should simply load your payment gateway and call the purchase_return() method. Commented Mar 12, 2014 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.