I am trying to integrate a new payment gateway for checkout plugin. As a base I have taken checkoutpaypal module. (almost) Everything works, but I would like to have have the possibility to show a form where a non-logged in user must fill-in its details (email, name etc), otherwise I will have no idea who paid for the order. In case of Paypal the user name is returned from the Paypal account, but in my case I need to fill in transaction details (name and email) before redirecting to the payment gateway (payment gateway does not require buyer's name and address in contrast to Paypal). I tried to do in a similar way as in checkoutemail, the form is shown, but when I click the submit button I get redirected to the checkout complete instead of to the payment gateway. Maybe someone could tell me how to do that:
1.where and how should I place redirect correctly to the buyer details fill-in form in case the user is not logged in user?
2. how to redirect from the fill-in form to the payment gateway passing the correct parameters from payment gateway settings?
I cannot figure out the 2nd issue, I think I have .
Thank you in advance
Posts: 4342
There's a big disparity between these two things - what you're saying is that almost everything works, except the difficult bit that's actually most of the work. Getting the execution flow right is difficult, and requires a thorough and solid understanding of the G2 framework, with respect to controllers, views (and the underlying model). This I cannot teach you. You also need a thorough understanding of the checkout API, which I *can* help you with.
Which payment gateway are you attempting to integrate?
EDIT: also take a look at the checkoutnochex module which does (I think) work the way you want.
Posts: 26
I have looked at the nochex, but it does not work as a payment mode. I don't know why. It installed with no errors. Well I have managed to collect customer's details and I'm stuck at the same place- I don't know how to send collected data to the payment gateway.
there are 3 urls to pass to the gw:
1. postback - confirmation on successful receipt of payment is sent to this url from the gw
2. Accepturl - on success
3. cancel - on fail
I can see how to post to the gw from this
but in my case nothing happens. It seems there is no redirect to the SendData. I will investigate this
Posts: 26
Is there a working version of checkoutnochex module? It installs correctly, but nochex does not appear as a payment option.
Posts: 4342
Let me try installing it here so I can check. I thought it was working, but I haven't used it for a while so I'm not 100% sure it's up to date with the latest changes to the checkout core.
Which is the new payment gateway you're trying to implement?
Posts: 26
I have fixed something in the nochex code, so it now appears as an available payment option and it posts to the nochex website, but I don't have an account with them, so I cannot tell is everything OK with it.
I have almost implemented a webtopay.com payment gateway. One of the issues not clear is how the gateway response is processed. e.g. I can see the following link for the accepturl in the webpage source
but if I try to paste this link into the browser, I get an error.
I can see that nochex uses controller=checkout.OrderComplete instead of controller=checkout.Complete. What is the correct way having in mind all those controller/view classes?
Posts: 4342
Unescape the & back to & - and you might have a problem because the authtoken is expired.
Should be checkout.Complete
What did you have to change in checkoutnochex? I'm actually wondering if the latest version is in the repository, or if I have something more recent locally that never got uploaded. (There was never any enthusiasm for NoChex - I don't think anyone is using that module.)
Posts: 26
I have changed
to
unserialize did not work for me in other module too. I simply used $session->get(..)and it worked. also there were syntax errors in files, single colon (":") used instead of double one, e.g.
I have attached a zip file.
I have gallery 2.3.1 installed.
Posts: 4342
Actually that's deprecated. You should use GalleryCheckoutAPI::getCurrentTransactionForPayment(). In future the transaction will not be stored in the session.