YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Coldfusion with PayPal Options
wkolcz
#1 Posted : Saturday, May 21, 2011 2:19:45 PM
Rank: Starting Member

Groups: Registered

Joined: 5/21/2011
Posts: 1
Location: Sterling Height, MI
Here is what i am trying to do. Is this possible or is there a better way?

I have a sign up form for membership to my web site. The only cost is $25 for a year. I want to form to submit, go back to the top of the page (by leaving the action=''), use a isDefined('Submit') to insert the person's information into the database, then return the new ID number, send it to the paypal popup window for them to pay.

When the payment is complete, have the IPN return to a page (http://mywebsite.com/register/process.cfm) which checks whether the payment was successful or not. If it is, it updates the new record, using the ID, with an 'active'. If failed, it returns to the page and has them try again.

<cfif isDefined('Submit')>

<cfset orgInfo = structNew() />
<cfset orgInfo.orgName = form.orgName />
<cfset orgInfo.city = form.city />
<cfset orgInfo.state = form.state />
<cfset orgInfo.webaddress = form.webaddress />
<cfset orgInfo.phoneNumber = form.phoneNumber />
<cfset orgInfo.zipCode = form.zip />
<cfset orgInfo.accountType = form.accountType />
<cfset orgInfo.orgType = form.orgType />
<cfset orgInfo.speciality = form.speciality />

<cfset userInfo = structNew() />
<cfset userInfo.firstname = form.firstname />
<cfset userInfo.lastname = form.lastname />
<cfset userInfo.username = form.username />
<cfset userInfo.password = Hash(form.pass) />
<cfset userInfo.title = form.title />
<cfset userInfo.emailAddress = form.emailAddress />
<cfset userInfo.role = "admin" />
<cfset userInfo.accountType = "member" />

<cfset orgID = createObject("component", "path.to.my.component").createNewAccount(#orgInfo#, #userInfo#) />

<!---What do I do here?--->

</cfif>
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.108 seconds.