Forum Academy Marketplace Showcase Pricing Features

Redirect form using a POST

This is the last hurdle in one of our local payment gateway’s API docs. Ironically, I’ve managed to get all the more complicated API calls and responses working great up until this last step in the process. The API docs say this:

So you would think, OK cool, it’s just a redirect so let me just use something in the workflow like:

a) Navigation > Open and external website > and then make the Destination the base URL with the 2 parameters added on using ampersands (&), so it would be something like:

https://secure.paygate.co.za/payweb3/process.trans&PAY_REQUEST_ID&CHECKSUM
(substituting PAY_REQUEST_ID and CHECKSUM with what the actual values are)

b) I also tried this version, but no luck:

https://secure.paygate.co.za/payweb3/process.trans?PAY_REQUEST_ID=ABC123&CHECKSUM=XYZ456

c) and then also one with the quotation marks:
https://secure.paygate.co.za/payweb3/process.trans?PAY_REQUEST_ID="ABC123"&CHECKSUM="XYZ456"

d) I even tried using the Run javascript plugin and using window.open(‘URL’) to achieve the same thing as in the above options

BUT - then they give you that little bit of help in the right column as in most API docs with an example request so you know you’re on the right track, but it’s in PHP. Here’s the example they give:

There you see they’ve snuck in a sneaky method=“POST”, so now I’m thinking, OK it’s actually an API call they’re doing there. But hang on, how can it be an API call and then a redirect at the same time?

So then I go ahead and setup a POST API call in my API Connector, but then what? I try all the Data types from the dropdown menu starting with JSON all the way down to Empty. The one that seemed the most promising response was when I used the Text data type. I received a response, but just a whole lot of HTML which I can see has worked correctly, but this still is not the redirect I’m looking for.

Also to note from their example in the above screenshot is they’re calling it a form and that they are saying that input types are “hidden”, which I understand since this is a payment gateway redirect and you can’t be sending IDs and sensitive data in a visible URL.

There has also been talk of this backend workflow API Endpoint (which I also tried) where they use the Redirect (302), but all of those point to internal pages, so I have no idea how to make that work when the redirect needs to go external.

So in summary:

  1. I can’t apply a normal redirect of just entering the URL to an external website because there is some sort of POST involved
  2. I can’t do a normal POST API call, because then after that, it needs to redirect somewhere

Apologies for the exhaustive (and possibly emotional) explanation, but I really can’t get my head around this and it really does seem to be quite simple. At face value, it’s a really straight forward action, but I have no idea how to execute it. From some of the forum topics, I’m sure there are others who have come across this similar issue who will share my frustration.

If anyone has some ideas on how to tackle this, it would be really appreciated. Even if it’s something so simple as one line that I’ve missed, I would be only too happy to admit being the fool here for not spotting what is actually an easy solution.

Sincerely,
A fellow no-coder (obviously…)