Forum > Networking and Web Programming

How to use the Elavon Converge Payment Gateway

<< < (3/5) > >>

Gustavo 'Gus' Carreno:
Hey RedOctober,

This version has the OpenSSL code.



--- Quote from: RedOctober on May 29, 2021, 03:33:53 am ---My goal is to use Elavon's Hosted Payments Page (HPP) to take payments from customer
--- End quote ---

Going by the example on that page, you need to wrap your '<ssl_blahblah>' elements within a '<txn>' pair:


According to the section Implementation Guidelines on this page,

--- Quote ---Converge doesn't expect a fully validated XML document, but an XML-formatted request assigned to URL encoded variables called xmldata. Only the Converge-specific elements for the transaction itself are supported.
--- End quote ---

See the part that I underlined. The language is unclear, as it says 'variables' (plural) but only names one variable 'xmldata'. So try this:

* use <txn></txn> to wrap your <ssl_blahblah> elements
* submit the request parameters as form-url-encoding of 'xmldata=<txn>...</txn>'

Hi Gus and Peirce.  I have not forgotten about you.  Gus, I tried to POST the XML using your test app.  Their server is still reporting "Bad request". Yet your XML is correctly formed according to the Elavon dev help website.

I have informed Elavon help that my tool (Lazarus) is more like PostMan than CURL, and if they could come up with a PostMan example of what is on their dev help page, it would be much easier for me to translate, than me trying to piece together what is supposed to happen from their dev help web pages.  So far, they have not given up on me, and they told me they are working on it.

What ever I learn, I will make a post in this forum explaining how to use Lazarus to interact with Elavon's Hosted Payment Page.

The tool is almost completely irrelevant. The issue is not the tool, but the proper format of the HTTP request to send to the server. This was pointed our earlier.

You also said "When I use simple Key=Value pairs in the request body, it works.  But when I use, what I call a "XML" style format in the body, it fails with a 'bad request'."

So, one has to ask, why change what works?

As PierceNg wrote, doesn't this need something like following?
When I press "submit" it displays error message - Invalid Credentials. I think you may correct it.

--- Quote ---<!Doctype html>
<meta charset=utf8>
<body><form action="" method="post">
Here is the data<br>
<textarea name="xmldata" rows=20 cols=80> <txn>
<input type=submit value="submit">
--- End quote ---

Of course you may use following: 

--- Quote ---  <input type=text name="ssl_merchant_id" value="my_merchant_id">
  <input type=text name="ssl_user_id" value="my_user_id">
--- End quote ---

with different action address of the form.

BTW, how did you setup Brook 5 ?


[0] Message Index

[#] Next page

[*] Previous page

Go to full version