Hi Gus, yes, you may ask. Here are the answers:
Background:
My goal is to use Elavon's Hosted Payments Page (HPP) to take payments from customers on-line. They give instructions how to do that in the following links. All of which I am told, are PHP or CURL examples. They don't support Lazarus, Indy components, Free Pascal etc. (I must be the first to attempt this) So when ever I ask Elavon developer help a question, I'm just a pain in their ass and they usually give me a terse answer just to get rid of me. That is why I am turning to this forum for help.
https://developer.elavon.com/na/docs/converge/1.0.0/integration-guide/transaction_types/credit_card/salehttps://developer.elavon.com/na/docs/converge/1.0.0/integration-guide/integration_methods/hosted_paymentshttps://developer.elavon.com/na/docs/converge/1.0.0/test-cardshttps://developer.elavon.com/na/docs/converge/1.0.0/overviewThe first step, is to obtain a token from a "get token" URL, then, I'm to use that token in a redirect of the customer's browser to a different URL.
I was able to obtain a token, after many weeks of frustration, using Postman as an intermediary tool.
Just obtaining a token and redirecting, ends up sending the customer to a blank Hosted Payments Page, where the customer is able to enter their own product description, (even though they will be choosing a product from my website, which clearly has a description), what ever price they want (even zero), and fill in what ever tax they want, even zero, then click the pay button.
To have "un-editable" fields in the Hosted Payments Page, I was told that I have to pass all product information, in the initial "get token" request, then, when the customer is redirected, the Hosted Payments Page will be populated with all that info (supposedly, I haven't got that far yet). The format that you have to send the product info info in, in the initial "get token" request, is shown at the bottom of this page:
https://developer.elavon.com/na/docs/converge/1.0.0/integration-guide/transaction_types/credit_card/saleYou see that the format is not form encoded key,value pairs. It looks like XML, but it's not that either.
I think the easiest way to solve this, is if an experienced TIdHTTP programmer wd obtain a developer account with Elavon and tinker with it. I'm very close to being a beginner with TIdHTTP, even though I've built API interfaces for RingCentral and Data 24/7 and CDYNE. PayPal "buy now" buttons are a breeze compared to Elavon.
So, to answer your questions specifically:
First of all, if you have it working with form encoded, why are you trying to do it another way?
Because the Elavon dev help personel and Elavon examples require two different formats for data submission. I can get one to work (get token), the other I can't (submit product info).
Second would be, why are you trying to send XML when you declare that you're sending form encoded?
and
And third, why are you sending badly formed XML and expecting any positive results?
Bc I'm a dum-ass beginner throwing myself at the mercy of Lazarus gurus for help.
I was also told to send the body in Raw format, what ever that is. So, again, form-encoded versus (something else). The Elavon help group is of no help to us Lazarus devs.
Thanks for any help you can provide Gus.