开发者

Authorize.net correct way to implement AIM method in php?

开发者 https://www.devze.com 2023-02-03 16:55 出处:网络
This should be a fairly simple question. Essentially, I believe开发者_运维百科 there\'s a good chance I\'m simply brainfarting.

This should be a fairly simple question. Essentially, I believe开发者_运维百科 there's a good chance I'm simply brainfarting.

I'm trying to implement a transaction with Authorize.net using the AIM method and I was unsure if I should have a page where the user adds all of their information and card, etc, and have that post to another page that does the cURL and response, etc., or if that's bad practice and I should have it all on one page.

That's basically the simple question, but I can NOT find any implementation docs or decent examples. The only one I can find has all of the info hard coded into the page and does the cURL and response stuff on the same page, which doesn't answer my question!


John Conde (whose posts around here a lot on these questions) has some documentation available here which I found to be really helpful.


You can do it on the same page, meaning the form, and the cURL call both on checkout.php. Check for the $_POST variable being set, if it isn't show the form, the destination will be checkout.php (make sure you use HTTPS). If $_POST is set, then make your call to authorize.net via cURL, parse the response, and show the customer a success or fail message.

0

精彩评论

暂无评论...
验证码 换一张
取 消