开发者

Registering user after successful Authorize.net DPM (Direct Post Method) payment

Is the following possible with the Authorize.net Direct-Post Method? If so, how would this be integrated? More of a high-level explanation would be helpful:

  • Visitor needs to fill out name, e-mail, and password fields for a new account
  • This user information is stored in the database only after successful payment to authorize.net

FYI I'm working with PHP here.

Ruling out the following

Since DPM creates its own form via getCreditCardForm and doesn't allow "personally identifying" information via Merchant-Defined fields, I don't see an easy way to put this on the same page.

I can't put the user sign up form after a successful payment, because I can't be 100% that they will fill it out (say they got disconnected).

Possibility?

I was thinking about possibly having the user form on page 1, storing the name/email/pass in SESSION variables, and going to page 2 with the payment form. After successful payment, the SESSION variables would be used to store the user in the database, 开发者_JS百科and the session would be destroyed. I am wary about the insecurity of storing the password in the session, and other possible issues with that method.

Another possibility would be using the authorize.net fields for e-mail and name, to insert the user into the database, while automatically generating a password that is displayed or e-mailed to them. I dislike that idea.

Should I just use the AIM (advanced integration method) instead? I am going to try that now. DPM had already been set up, is why I am asking.


I've switched to using AIM instead. Using the sample code from here: http://developer.authorize.net/resources/files/samplecode/php_aim.zip

I copied over the HTML/CSS of the form fields from the previous DPM getCreditCardForm, since the sample didn't come with example HTML. User registration and payment are now on the same form. Now I just have to put the $_POST data into the curl request, and check if it was successful before adding the user to the database. Not too hard of a switch.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜