4 replies [Last post]
ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Was this information Helpful?

Ok, I've done a payment gateway module for an Australian bank called ANZ eGate. It is a service where the site redirects to their hosted forms, completes the transaction, and then redirects back to the site. I've got it all working, the only problem is when it redirects back to the site, it isn't a page within the theme, it is just a white blank web page with black text that then links back to the site. I believe I copied mine off of the 2checkout one. Is there a way that when redirected back, the page that shows the results (Accepted or error) is within the site, within the theme? I can't seem to figure out what I could do differently, or why it might not be able to work that way.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Payment Gateway redirect back to site

The 2Checkout completion page building function prints the output and uses exit() instead of just returning the output due to the nature of 2Checkout's system. They do a remote request for your custom completion page instead of a redirect to it, so all relative links were breaking (including stylesheets).

If ANZ is doing an actual redirect back to your site, simply changing the end of that function should do the trick.

ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: Re: Payment Gateway redirect back to site

Ok, so I think I've solved that problem for the most part...I removed the exit() and just returned the output, is that correct? I now have my text, but in front of it is a bunch of text I don't know where it came from...haha. Mystery text. I get this:

Order complete
You are currently viewing the possible transitions to and from workflow states. The state is shown in the left column; the state to be moved to is to the right. For each transition, check the box next to the role(s) that may initiate the transition. For example, if only the hulking_editor role may move a node from Review state to the Published state, check the box next to hulking_editor. The author role is built in and refers to the user who authored the node.
An error has occurred during payment. View the response below and either re-try your order with another method or contact us for help.Transaction Response Code: 1Transaction Response Code Description: Unknown ErrorMessage: Unspecified Failure

The order complete is the heading, that's fine. The bottom text is my text, which is correct for what I entered for the order...but the first paragraph has just appeared. Do you think that has something to do with the page I've returned? Anyway, I've attached my payment gateway, I know you can't do much with it, but maybe you will notice something I've done wrong?

AttachmentSize
eGate.zip 4.64 KB
ssherriff's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 215
Re: Payment Gateway redirect back to site

Ok, it has something to do with workflow, though I have no idea why. That line is in the help area of the workflow module...I'm stumped...that is just for another area of the site. I haven't try to attach workflow to any of the ubercart stuff. I disabled it for now , I'll have to investigate it later.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Re: Payment Gateway redirect back to site

Aye, I've got nothing. I haven't used the workflow module and don't know how its help text could be showing up in Ubercart URLs. Sticking out tongue

Good luck with it. ^_^