可以 Intraweb + Delphi 使用SIM 处理authorize.net 中继响应?
我们* 有一个由 Delphi + Intraweb(用于前端/Web 代码管理)创建的 Web 应用程序,用于管理订购流程。它获取订购信息,然后向authorize.net发送交易请求(本质上使用他们的SIM示例代码 )。这工作得很好,并且信用卡订单已处理。
然而,当authorize.net将表单发送回中继响应URL(http://developer.authorize.net/guides/SIM/Receipt_Options/Relay_Response.htm)时,Intraweb应用程序崩溃了。我可以使用 TamperData 看到表单数据正在正确发送。她可以看到她的程序打开了一个数据库连接,然后超时。
- 我已经用尽了我的 google-fu,但没有找到任何 Intraweb 代码能够接受传入表单帖子的示例。 (这可能就是我们真正需要的。如果我们能够将数据进入 Intraweb/Delphi 世界,那么我们就可以管理其余的内容。
- ) com/intraweb/IntrawebManual.pdf" rel="nofollow">Intraweb 文档 表明 IW 将接受 URL 上传递的参数,但没有提及接受 POST 数据。
- Authorize.net 社区论坛有一个询问/回答的帖子,基本上说“抱歉,我们没有任何 Delphi 代码示例,请询问您的供应商。”
- Intraweb 技术支持无法帮助她。 (我认为他们还没有回复几周前的请求,但我不确定。)
- 我建议她创建一个模仿authorize.net表单帖子的测试应用程序存根,以确保表单对象是被正确创建。 (我不太明白拖放表单字段的背后发生了什么,但我倾注了生成的源代码来试图弄清楚这一点。)但是表单 POST 就是表单 POST,对吗?我的意思是,它是 HTTP,而不是魔法。但这样做有两个问题。 1.) Intraweb 似乎强制表单字段名称全部大写。 2.) 她说 IW 不接受下划线作为表单字段名称的一部分。当然,我们坚持使用authorize.net 发送的内容,小写字母、下划线分隔等等。
您是否有任何见解、示例代码的提示或建议放弃所有内容并转向另一个解决方案?我们非常感谢以上任何一项。
*我们 = 一位老派的 Delphi 程序员/DBA,对 Delphi 了如指掌,但 Intraweb “自动工作”,而我,一名 Java 程序员,偶尔在国家的另一边做 PHP 黑客,对可视化 IDE 过敏,但试图解释它互联网与HTTP 对她来说是个谜。对于这个特殊问题,我们的能力似乎小于各个部分的总和。
We* have a web application, created by Delphi + Intraweb (for the front end/web code management) that manages an ordering process. It acquires ordering information, then sends a transaction request to authorize.net (essentially using their SIM sample code). This works beautifully, and the credit card order is processed.
However, when authorize.net sends the form post back to the relay response url (http://developer.authorize.net/guides/SIM/Receipt_Options/Relay_Response.htm), the Intraweb app blows up. I can see, using TamperData, that the form data is being sent correctly. She can see that her program opens a database connection, then times out.
- I've exhausted my google-fu, and haven't found any examples of Intraweb code being able to accept incoming form posts. (That's probably all we really need. If we could get the data into the Intraweb/Delphi world, we could then manage the rest.)
- The Intraweb documentation suggests that IW will accept params passed on a URL, but doesn't mention accepting POST data.
- The authorize.net community forum has an asked/answered post, that says basically "Sorry, we don't have any Delphi code samples, ask your vendor."
- Intraweb Tech Support hasn't been able to help her. (I think they haven't responded to the request from several weeks ago, but I'm not certain.)
- I suggested that she create a test application stub that mimicked the authorize.net form post, to be sure that the form objects were being properly created. (I don't really understand what's happening under the covers of the drag-n-drop form fields, but I poured over the generated source code to try to figure this out.) But a form POST is a form POST, right? I mean, it's HTTP, not magic. But there were two problems with that. 1.) Intraweb seems to force form field names to all CAPS. 2.) She says that IW won't accept underscores as a part of the form field name. And of course, we're stuck with what authorize.net sends, lower-case, underscore separated, and all.
Do you have any insights, pointers to sample code, or advice to chuck it all and move to another solution? We'd greatly appreciate any of the above.
*We = an old-skool Delphi programmer/DBA who knows Delphi inside out but Intraweb "automagically works" and me, a Java programmer and occasional PHP hacker on the other side of the country, who's allergic to visual IDE's but trying to interpret teh Internets & the mysteries of HTTP for her. For this particular problem, we appear to be less than the sum of our parts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您使用 Authorize.net 的 SOAP 接口。我有一个 Delphi/Intraweb 应用程序,可以使用authorize.net 处理付款和订阅,我花了 1 个小时才弄清楚。只需设置一个小型测试项目并从authorize.net导入wsdl,您就可以立即处理他们提供的所有内容。如果想尝试并遇到问题,我可以通过我的代码中的一些示例来帮助您。
I suggest you use the SOAP interface for Authorize.net. I have a Delphi/Intraweb application that handles payments and subscriptions with authorize.net, took me 1 hour to figure it out. Just setup a small test project and import the wsdl from authorize.net, you would be able to handle everything they provide in no time. If want to try and have problems, I can help you with some examples from my code.
感谢 @ioan 的指点,我们已经启动并运行了 SOAP 解决方案。我的同事花了一些尝试和错误来编写 Pascal 代码,但她将其传递给我发布,以防它节省其他人一些时间。她最终得到的结果如下:
她还发送了提醒,以确保您在运行测试与生产时使用正确的信息:“我使用了下载的 WSDL 中的 URL。该 URL 用于生产帐户。您必须使用测试帐户的列表不同,所以我一直收到一个空列表,并认为这是我的代码中的错误,没有得到响应。”
再次感谢所有的帮助和建议!
Thanks to pointers from @ioan, we've got a SOAP solution up and running. It took my colleague a bit of trial and error to write the Pascal code, but she passed it on to me to post in case it saves anyone else some time. Here's what she ended up with:
She also sends the reminder to be sure you're using the right info when running tests vs. production: "I was using the URL in the downloaded WSDL. Which is for production accounts. You must use a different one for test accounts. So I kept getting an empty list, and thought it was error in my code, not getting a response."
Thanks again for all of the help and suggestions!
Arcana (www.arcanatech.com) 曾经有一个信用卡组件,专门用于与 Intraweb 和authorize.net 配合使用。虽然配置使用所需的 SSL 有点棘手,但这段代码很便宜,并且至今仍在 6-8 年前编写的应用程序中使用。
There was once a credit card component from Arcana (www.arcanatech.com) that was made specifically to work with Intraweb and authorize.net. While it was a little tricky to configure the SSL required for use, this piece of code was inexpensive and is still in use to this day in applications written 6-8 years ago.