Integrating E-junkie With 3rd-Party & Custom Services
How can I have E-junkie post the order data to a URL?
With what third-party services is E-junkie pre-integrated?
E-junkie can transmit all the order data to your URL only for successful completed payments. We submit this data via HTTP POST, so any generic form-handler type of script (such as typically used for receiving an HTML form submission) should be able to receive and parse the order data however you wish. If E-junkie's server is unable to reach your server, it will not retry.
Our data transmission follows the format of PayPal IPN but includes extra fields containing order data we have that PayPal does not send; any script that can receive PayPal IPN should be able to receive our order data, as long as it can handle or ignore our extra fields and does not attempt to validate IPN (which would fail since we are not PayPal, and we validate the actual PayPal IPN in the first place before sending order data anyway).
To have order data sent to the same URL for all purchases, you can specify your URL in Seller Admin > Account Preferences as the Common Notification URL.
You can also/instead have order data sent only for purchases of a specific product, or specify a different URL to receive purchase data for each product:
- Check Send transaction data to a URL while adding or editing your product;
- Press the Add Product button if you are adding the product, or press the NEXT button if you are editing the product;
- In the Payment Variable Information URL field, enter the URL of your script that will receive the order data;
- Press NEXT button till you can SUBMIT to reach the button code screen;
- Use the Buy NOW or E-junkie Cart button codes from this screen to start selling your product (if you had already copy-pasted the button code for this product and made no other changes to the product, your existing code will continue to work fine).
Common Order Data
- payer_email
- txn_id - transaction id of the payment. in some cases we add prefix to it (gc- for google checkout, au- for authorize.net, 2co- for 2checkout, cb- for clickbank and tp- for trialpay payments)
- first_name
- last_name
- mc_gross - total amount of payment
- custom - if you added &custom=someValue to the url in the shopping buttons you got from e-junkie
- shipping
- tax
- invoice - unique invoice id that we generate
- for_auction
- auction_buyer_id
- address_street
- address_city
- address_state
- address_zip
- address_country
- address_country_code - shipping address 2-letter ISO country code
- address_phone
- address_business_name - shipping address company name (if provided)
- payer_business_name - billing address company name (if provided)
- payer_phone - billing phone
- residence_country - billing country (if supported by payment processor)
Item Specific
Here,
X represents the in-cart position of the item in this order:
- item_nameX
- item_numberX - item number you have set in product configuration
- quantityX - quantity sold
- mc_gross_X - sale price for this product * quantity sold
- option_name1_X - (if applicable) if you are using any options with your products, then this will contain first option's name
- option_selection1_X - (if applicable) if you are using any options with your products, then this will contain first option's value that buyer selected
- option_name2_X
- option_selection2_X
- option_name3_X
- option_selection3_X
- item_cart_position - Only sent to Payment Variable Information URL (not Common Notification URL), this provides you with the value of X (in the names above) of the specific item for which order data is being sent your URL (since data for all items in the order will be included in the transmission)
- sku - Only sent to Payment Variable Information URL (not Common Notification URL), this is the SKU of the item for which order data is being sent your URL - only applicable if you also configured "Variants affecting price..." for the item.
Additional Variables
These variables are passed in addition to the order data we get from the payment processor:
- handshake - md5(your_e-junkie_login_email+md5(your-e-junkie-password))
<?php
// You can use this variable to ensure that the data coming is from
// E-junkie server. you can of course use any language of your choice.
// Put these lines in top of your script to make sure that the data
// you are getting is from e-junkie server.
// If your e-junkie login email and password is known to someone
// else, then this verification will be moot.
if ($_POST['handshake']!==md5("your@login.email".md5("your_e-junkie_password")))
{
exit;
}else {
// You can do anything you want with the variables. to illustrate the
// point, I am just going to email them to myself here:
mail ("your@email.address.com","post from e-junkie", print_r($_POST,true));
}
?>
- from_name - your display name in e-junkie profile
- from_email - your display email in e-junkie profile
- expiry_hours - (if applicable) maximum number of hours you allow your download links to be valid for in your product configuration
- max_downloads - (if applicable) maximum downloads you allow in your product configuration
- key - (if applicable) stored or generated registration key sent to the buyer
- country_mismatch=true - only sent if country selected in cart does not match the one given during a PayPal Standard checkout (other checkout methods cannot mismatch)
- zipcode_mismatch=true - only sent if postal/zipcode given in cart does not match the one given during a PayPal Standard checkout (other checkout methods cannot mismatch)
- client_shipping_method_id - Shipping Rule# for the Shipping Method buyer selected in their cart
- txn_type - checkout method used:
- cart (PayPal Standard)
- expresscheckout (PayPal Pro Express Checkout using a PayPal account)
- ppdirect (PayPal Pro Direct Payments using a card)
- authnet (Authorize.net)
- web_accept (PayPal Buy Now)
- ejgift (E-junkie Free Checkout)
For your convenience, E-junkie provides an interface which you can use to interface with your SwiftCD account, Aweber and do other things like sending Sale Notification emails to other email addresses. It is an open-ended interface and you can specify a passthru URL where we can POST all the variables (as documented above) after our script is done.
- PDF Stamping
- We can stamp the buyer's name, email and their unique Transaction ID on the top-left of each page of the PDF they receive before they download it. See this help page for instructions and more information.
- SwiftCD
- If your product comes with a CD and you are using SwiftCD to deliver it, follow the steps below to let E-junkie send your account and product data to SwiftCD for each successful transaction.
- Check Send transaction data to a URL while adding or editing your product.
- Enter your SwiftCD Item Number in the "Item number" field.
- Press the Submit button if you are adding the product, or press the Next button if you are editing the product;
- In the Payment Variable Information URL field, please enter (all on one long line):
http://www.e-junkie.com/ecom/o_plug.php?
&swift_user=YOUR_SWIFTCD_USERNAME
&packageid=YOUR_SWIFTCD_PACKAGE_ID
&labelid=YOUR_SWIFTCD_LABEL_ID
- Press NEXT button till you can SUBMIT to reach the button code screen;
- Use the BUY NOW or E-JUNKIE CART buttons code from this screen to start selling your product. If you were editing the product, use the new button code from this screen as it changes when you change the Item Number.
NOTE: If your product uses our registration code system, the codes will be passed to SwiftCD automatically along with the other necessary product and transaction information.
- Aweber
- You can have new buyers automatically subscribed to a mailing list you maintain with the Aweber email list server:
- In your Aweber account:
- Click on List Settings tab;
- Click on Parsers;
- Checkmark the box for E-junkie Parser.
- Choose one of the following:
- If you want all buyers subscribed to the same Aweber list, go to the Seller Admin > Edit Account Preferences > Common Notification URL field;
- If you only want buyers of some products subscribed, or want buyers subscribed to different lists according to the item(s) ordered:
- Check Send transaction data to a URL while adding or editing each product;
- Press the Submit button if you are adding the product, or press the Next button if you are editing the product;
- Find the Payment Variable Information URL field.
- In the relevant URL field, please enter (all on one long line):
http://www.e-junkie.com/ecom/o_plug.php?
&aweber=LISTNAME@aweber.com
(where LISTNAME is the name of the Aweber mailing list you want new buyers subscribed to -- if you already have http://www.e-junkie.com/ecom/o_plug.php? you do not need to repeat it :^)
- Press NEXT button (if necessary) until you can SUBMIT to save changes.
NOTE: Newly subscribed buyers will receive an opt-in email from Aweber to confirm their wish to subscribe.
- Multiple Emails
- All notification emails from E-junkie are sent to the same email address you use to log into your E-junkie Seller Admin (you can change this in Seller Admin > Edit Profile). If you wish to have an extra copy of order details sent to an additional email address (such as to a drop shipper or fulfillment house, or to a clerk at your own business):
- Choose one of the following:
- If you want the extra notification to be sent for every order, go to the Seller Admin > Edit Account Preferences > Common Notification URL field;
- If you only want the extra notification sent for certain products, or want extra notifications sent to different emails according to the item(s) ordered:
- Check Send transaction data to a URL while adding or editing each product;
- Press the Submit button if you are adding the product, or press the Next button if you are editing the product;
- Find the Payment Variable Information URL field.
- In the relevant URL field, please enter (all on one long line):
http://www.e-junkie.com/ecom/o_plug.php?
&m_emails=first@email.address,second@email.address
,third@email.address,fourth@email.address,fifth@email.address
(our script will send the E-junkie notification email to all your specified emails, up to 5 -- if you already have http://www.e-junkie.com/ecom/o_plug.php? you do not need to repeat it :^)
- Press NEXT button (if necessary) until you can SUBMIT to save changes.
- Passthru
- If you want to use the above built-in integrations and also POST order data to your URL:
- Check Send transaction data to a URL while adding or editing your product;
- Press the Submit button if you are adding the product, or press the Next button if you are editing the product;
- In the Payment Variable Information URL field, please enter (all on one long line):
http://www.e-junkie.com/ecom/o_plug.php?
&postto=http://www.yoursite.com/yourscript.ext
(if you already have http://www.e-junkie.com/ecom/o_plug.php? you do not need to repeat it :^)
- Press NEXT button (if necessary) until you can SUBMIT to save changes.
- Combining Integrations
- You can make our o_plug.php integration do multiple things; combine any/all of the parameters described above onto one line in your Payment Variable Informaiton URL field, like so:
http://www.e-junkie.com/ecom/o_plug.php?
&swift_user=YOUR_SWIFTCD_USERNAME
&packageid=YOUR_SWIFTCD_PACKAGE_ID
&labelid=YOUR_SWIFTCD_LABEL_ID
&aweber=LISTNAME@aweber.com
&m_emails=first@email.address,second@email.address
,third@email.address,fourth@email.address,fifth@email.address
&postto=http://www.yoursite.com/yourscript.ext