Can Intraweb + Delphi handle authorize.net authorization response using a SIM card?

We have a web application created by Delphi + Intraweb (for managing the interface / web code) that controls the ordering process. He acquires the order information, then sends a transaction request to authorize.net (essentially using the SIM card code ). It works beautifully and credit card order is being processed.

However, when authorize.net sends the form message back to the relay response URL (http://developer.authorize.net/guides/SIM/Receipt_Options/Relay_Response.htm), the Intraweb application explodes. I see, using TamperData, that form data is submitted correctly. She can see that her program opens a connection to the database, and then disconnects.

  • I ran out of my google-fu and did not find any Intraweb code examples that could accept incoming messages in the form. (This is probably all we really need. If we could get the data into the Intraweb / Delphi world, then we could manage the rest.)
  • The in-page documentation assumes that IW will accept the parameters passed to the URL, but does not mention accepting the POST data.
  • The authorize.net community forum has a set / reply mail, which basically says "Sorry, we don’t have any Delphi code samples, ask your provider."
  • Technical Support Intraweb Tech could not help her. (I think they did not respond to the request a few weeks ago, but I'm not sure.)
  • I assumed that she created a test application stub that emulated the form authorize.net message to ensure that the form objects were correctly created. (I really don’t understand what is happening under the covers of the drag-n-drop form fields, but I poured the generated source code to try to figure it out.) But the POST form is the POST form, right? I mean, this is HTTP, not magic. But there were two problems with this. 1.) Intraweb seems to force the form field names to all CAPS. 2.) She says that IW will not accept underscores as part of the form field name. And, of course, we are stuck in what authorize.net passes, lowercase, underscore is split and that's it.

Do you have any ideas, pointers to sample code or tips to pull it all out and move on to another solution? We would greatly appreciate all of the above.

* We = an old Delphi / DBA programmer who knows Delphi inside out, but Intraweb "automatically works", and I, a Java programmer and a random PHP hacker on the other side of the country, who are allergic to IDE rendering but try to interpret the secrets of the Internet HTTP for her. For this specific task, we find ourselves less than the sum of our parts.

+4
source share
3 answers

Thanks to pointers from @ioan, we have a SOAP solution and it works. It took a colleague some trial and error to write Pascal's code, but she handed it to me in the mail if it ever saved anyone else. Here's what she ended up with:

procedure TfrmSOAP.btnGetUnsettledReportClick(Sender: TObject); var X : ServiceSoap; MyAuthentication : MerchantAuthenticationType; MyRequest : GetUnsettledTransactionListRequestType; aResponse : GetUnsettledTransactionListResponseType; msg : string; i : integer; begin inherited; //Call the service X := GetServiceSoap(false); //create some variables/parameters to pass back and forth MyAuthentication := MerchantAuthenticationType.Create; MyRequest := GetUnsettledTransactionListRequestType.Create; aResponse := GetUnsettledTransactionListResponseType.Create; try //assign values to the MerchantAuthenticationType parameter MyAuthentication.name_ := APILoginTest; MyAuthentication.transactionKey := TransKeyTest; //request a list of unsettled transactions aResponse := X.GetUnsettledTransactionList(MyAuthentication, MyRequest); //check to see if the request was successful if aResponse.resultCode <> messagetypeenum(0) then begin ShowMsg('Error'); ShowMsg(aResponse.messages[0].text); end; //step through the list, and display i, InvoiceNo, and LastName. for i := 0 to high(aResponse.transactions) do msg := msg + IntToStr(i) + ') ' + aResponse.transactions[i].invoiceNumber + ' '+ aResponse.transactions[i].lastName + #13; ShowMsg(msg); finally MyRequest.Free; MyAuthentication.Free; aResponse.Free; end; end; 

She also sends a reminder to make sure that you use the correct information when running tests or productions: "I used the URL of the downloaded WSDL, which is for production accounts. For testing, you should use another for testing, so I continued to get an empty list and thought it was a mistake in my code without receiving an answer. "

Thanks again for the help and suggestions!

+2
source

I suggest you use the SOAP interface for Authorize.net. I have a Delphi / Intraweb application that processes payments and subscriptions using authorize.net, it took me 1 hour to figure this out. Just set up a small test project and import wsdl from authorize.net, you can process everything that they provide in the shortest possible time. If you want to try and problems, I can help you with some examples from my code.

+2
source

There was once a credit card component from Arcana (www.arcanatech.com) that was specifically created to work with Intraweb and authorize.net. Although it was a little difficult to configure the SSL required to use, this piece of code was inexpensive and is still used in applications written 6-8 years ago.

0
source

Source: https://habr.com/ru/post/1346285/


All Articles