E-Junkie Forum http://www.e-junkie.com/bb/ E-Junkie Forum RSS en-us Copyright 2012, 19.5 Degrees. All rights reserved. webmaster@e-junkie.com webmaster@e-junkie.com Thu, 14 Aug 2008 16:46:32 GMT Fri, 10 Feb 2012 10:24:41 GMT 681 E-JUNKIE 5 E-Junkie Forum http://www.e-junkie.com/bb/ http://www.e-junkie.com/ej/logo.gif 290 104 Post #10 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Thu, 14 Aug 2008 16:46:32 GMT
<cfparam name="payer_email" default="john@doe.com">
<cfparam name="txn_id" default="999999">
<cfparam name="first_name" default="firstname">
<cfparam name="last_name" default="lastname">
<cfparam name="mc_gross" default="0.00">
<cfparam name="address_city" default="novalue">
<cfparam name="address_state" default="novalue">
<cfparam name="address_zip" default="novalue">
<cfparam name="key" default="novalue">
<cfparam name="item_name1" default="novalue">
<cfparam name="item_number1" default="novalue">
<cfparam name="quantity1" default="novalue">
<cfparam name="mc_gross_1" default="mc_gross_1">

Based on our own configuration, we only really sell one product

<cfparam name="item_name2" default="novalue">
<cfparam name="item_number2" default="novalue">
<cfparam name="quantity2" default="novalue">
<cfparam name="mc_gross_2" default="mc_gross_2">

The parameters some in via a form

<cfset email='#Form.payer_email#'>
<cfset txn_id='#Form.txn_id#'>
<cfset first='#Form.first_name#'>
<cfset last='#Form.last_name#'>
<cfset mc_gross='#Form.mc_gross#'>
<cfset address_city='#Form.address_city#'>
<cfset address_state='#Form.address_state#'>
<cfset address_zip='#Form.address_zip#'>
<cfset key='#key#'>

<cfset item_name1='#Form.item_name1#'>
<cfset item_number1='#Form.item_number1#'>
<cfset quantity1='#Form.quantity1#'>
<cfset mc_gross_1='#Form.mc_gross_1#'>

<!-- only if it exists? -->
<CFIF IsDefined("FORM.quantity2")>
<cfset item_name2='#Form.item_name2#'>
<cfset item_number2='#Form.item_number2#'>
<cfset quantity2='#Form.quantity2#'>
<cfset mc_gross_2='#Form.mc_gross_2#'>
</CFIF>

<!-- Serial Numbers (Product Keys) are published with a Carraige Return/Line Feed, for simplicity I replace that with a "+" sign so I can stick them into one database field -->
<cfset key = Replace(key, Chr(13), "+", "ALL")>
<cfset key = Replace(key, Chr(10), "+", "ALL")>

Here is the real code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>eJunkie Processing</title>
</head>
<body>

<!-- Here I'm creating an email as a backup mechanism -->
<CFMAIL TO="me@mydomain.com"
SERVER="mail.mydomain.com"
FROM="ejunkie@mydomain.com"
SUBJECT="eJunkie Purchase from #email#">
User Information
email: #payer_email#
txn_id: #txn_id#
First: #first#
Last: #last#
Payment: #mc_gross#
address_city=#address_city#
address_state=#address_state#
address_zip=#address_zip#

Serial Number
serialnumber=#key#

Item 1
item_name1=#item_name1#
item_number1=#item_number1#
quantity1=#quantity1#
mc_gross_1=#mc_gross_2#

Item 2
item_name2=#item_name2#
item_number2=#item_number2#
quantity2=#quantity2#
mc_gross_2=#mc_gross_2#

</CFMAIL>
<!-- now do the SQL Insert Statement -->
<cfquery name="qeJunkieInsert" datasource="mydatabase">
Insert into eJunkie (transactdate, txn_id, email, firstname, lastname, grossamount, city, state, zip, serialnumber)
values
(#CreateODBCDate(now())#, '#txn_id#', '#payer_email#', '#first#', '#last#', #mc_gross#, '#address_city#', '#address_state#', '#address_zip#', '#key#')
</cfquery>
Thanks
</body>
</html>

And that's it. Works for me, pretty simple.]]>
E-junkie Discussions; dhacker
Post #9 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Fri, 8 Aug 2008 03:25:42 GMT E-junkie Discussions; dhacker Post #8 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Thu, 7 Aug 2008 16:44:36 GMT E-junkie Discussions; matthew239 Post #7 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Mon, 21 Jul 2008 20:19:12 GMT E-junkie Discussions; matthew239 Post #6 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Mon, 19 May 2008 23:24:53 GMT E-junkie Discussions; dhacker Post #5 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Mon, 19 May 2008 21:51:51 GMT
Funny how people that pay me to improve their business listen but when its free advice it is disgarded. I have always laughed at that. I tell people all the time that they really do need to pay me to help them or it won't work lol.]]>
E-junkie Discussions; lemonbar
Post #4 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Mon, 19 May 2008 21:44:50 GMT
However, I still think you guys would want to put a 'complete' php script there or a link to some robust examples (even better) or ones the manipulate the datebase.

It just makes it easier for more people to use your service.

Having a section on your site where code example are placed would be a cool thing as well.]]>
E-junkie Discussions; lemonbar
Post #3 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Mon, 19 May 2008 21:25:50 GMT http://www.e-junkie.com/ej/help.integration.php
(BTW, the street address variable would indeed be "address_street" -- looks like we missed that one in the documentation :^).

Notice at the very end of that page our "Passthru" instructions, which would just dump all the data we collect for each transaction to your URL, so you could capture that and sift thru everything to see what's useful or just grab what you need and ignore the rest.

Getting your own custom scripts to work is of course entirely up to you and your personal expertise with PHP or Perl or whatever you're scripting in; we cannot help develop or troubleshoot or bugfix your own scripting.]]>
E-junkie Discussions; E-junkieGuru
Post #2 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Sun, 18 May 2008 04:22:32 GMT
does the notification list we get not always display all values? maybe due to being null?

what is the address field name? i only see city, state, zip listed on the site. is it 'address_street' ?]]>
E-junkie Discussions; lemonbar
Post #1 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 http://www.e-junkie.com/bb/topic/2597/pg/0#post7431 Sat, 17 May 2008 21:00:45 GMT
maybe it is already on the site somehwere and if no tthen maybe e-junkie can add it for reference.

how do most handle errors. do they have an email sent to site admin?

do most of you have an email sent on successful ad as well?

thank you]]>
E-junkie Discussions; lemonbar