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 your server fails to respond when E-junkie attempts to submit order data to it, our system will not retry but will normally email a notification of the failure to your E-junkie Login Email address. If your URL would receive the order data and also return output which you want us to forward to the buyer, use our Send Generated Codes feature instead.
Our data transmission follows the format of PayPal IPN but also includes some extra fields reporting order data pertaining to our service that PayPal does not handle (these are listed as Non-IPN Variables below). Any script that can receive PayPal IPN should be able to receive our order data, as long as it can handle/ignore our extra fields and does not require validating the IPN with PayPal (which would fail since we are not PayPal, and we validate the actual PayPal IPN in the first place before sending order data anyway). Since we can do this regardless of the buyer's checkout method, this means E-junkie can send a PayPal-style IPN even for checkouts that did not go through PayPal.
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 when a
specific product is purchased, or specify a different URL to receive purchase data for each product (the following steps are
not necessary if you're only using a Common Notification URL):
- While adding or editing your product, check Send transaction data to a URL in the first screen of product settings;
- Click the More Options button if you are adding a new product, or click the Next button if you are editing an existing product;
- In the Payment Variable Information URL field, paste the URL where your custom/3rd-party script will receive the order data;
- Click the Next button till you can Submit settings to reach the button codes screen;
- Use the E-junkie Cart or Buy Now 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, the existing buttons in your site will continue to work fine).
payer_email
txn_id - Transaction ID generated by payment processor (for non-PayPal txns we add a prefix: 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
mc_shipping
tax
invoice - unique invoice id that we generate
for_auction
auction_buyer_id
address_name - ship-to full name if different from billing (buyer) name
address_street - for two-line addresses, this variable passes both lines, separated by a newline character
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)
payment_date - Time/Date stamp generated by payment processor, in the format HH:MM:SS Mmm DD, YYYY ZZZ (e.g. 12:34:56 Dec 21, 2012 MST)
payer_business_name - billing address company name (if provided)
payer_phone - billing phone
residence_country - billing country (if supported by payment processor)
charset - this should normally be 'utf-8', as we now convert order data into UTF-8 from whatever charset was sent by the payment processor (in very rare cases this may identify the original charset if conversion to UTF-8 cannot be done)
Item Specific IPN Data
Here,
X represents the position of each item in the buyer's cart:
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
E.g., the first item in the buyer's cart would be identified with item_name1, item_number1, quantity1, etc. while the second cart item would be item_name2, etc.
Additional Non-IPN Variables
The following variables are unique to our system and will be passed to your Integration URL(s) in addition to the order data we get from the payment processor. These are not part of the standard PayPal IPN data set, so any IPN-compatible scripts or third-party services you're using with our Integration feature must be able to handle or ignore these fields.
Item Specific Non-IPN Data
These are only sent to Payment Variable Information URLs (not to a Common Notification URL):
item_cart_position - this identifies which particular item in the order triggered a given submission to a product-specific Payment Variable Information URL (which receives the full data for all items in the order), so you can match this to the value of X in the Item Specific IPN Data variable names (listed above) to identify which details in the submission pertain to that particular item -- e.g., if you receive item_cart_position=2, you'll know that submission was triggered by the second item in the buyer's cart, corresponding to item_name2, item_number2, etc.
sku - only sent to the Payment Variable Info URL for items configured with Variants having individual price/weight/stock/SKU, this is the SKU you'd configured for the particular Variant of that item which the buyer ordered.
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 number of download Attempts you allow in your product configuration
affiliate_fee - (if applicable) commission earned on the item by your E-junkie affiliate
key - (if applicable) stored or generated code (key/license/serial/PIN) sent to the buyer (this variable is not sent to keygen URLs)
Common Order Non-IPN Data
These are sent to both a Common Notification URL and Payment Variable Information URLs:
from_name - your Display Name in E-junkie profile
from_email - your Display Email in E-junkie profile
country_mismatch=true - only sent if country selected in cart does not match the one given during a PayPal Payments 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 Payments Standard checkout (other checkout methods cannot mismatch)
client_shipping_method_id - - # of the Shipping Rule applied in buyer's cart
shipping_method_type - Shipping Rate Calculator for the Shipping Rule applied in buyer's cart
shipping_method_desc - Shipping Method Description for the Shipping Rule applied in buyer's cart
discount_codes - Discounts applied to the order
buyer_ip - public IP address assigned to buyer's computer or router at the time of checkout
ej_txn_id - our internal ID for this transaction, an unsigned integer value (often useful when the standard txn_id is too long for some field in your software; this is also the only order ID we reveal to your affiliates when they earn commission on a sale)
txn_type - checkout method used:
cart (PayPal Payments Standard - cart order)
web_accept (PayPal Payments Standard - Buy Now button)
expresscheckout (PayPal Payments Pro Express Checkout using a PayPal account)
ppdirect (PayPal Payments Pro Direct Payment using a card)
gc_cart (Google Checkout)
authnet (Authorize.net)
cb (ClickBank)
2co_cart (2CheckOut)
tp (TrialPay)
ejgift (E-junkie Free Checkout)
handshake - md5(your_e-junkie_login_email+md5(your-e-junkie-password))
You can use this variable to ensure that the data is coming from E-junkie's server. We take an md5 hash of your E-junkie password, then tack your E-junkie login email in front of that hash, then re-hash the whole thing in md5 again. If your E-junkie login email and password became known to someone else, they could forge this hash. If you ever change your E-junkie login email and/or password, you'd need to update the hash reference in your keygen script. You can use any scripting language of your choice to compare the handshake hash we pass against a matching hash at your end. Here's an example using PHP:
<?php
// Put this in the top of your script, so if the handshake
// does not match, it will exit, but otherwise it runs the
// rest of your script:
if ($_POST['handshake']!==md5("your@login.email".md5("your_e-junkie_password")))
{
exit;
}else {
// Here is where you do whatever you wish with the order
// data variables. To illustrate the point, this example
// will just email the data to a given address:
mail ("your@email.address.com","post from e-junkie", print_r($_POST,true));
}
?>
What third-party services already support E-junkie Integration?
With what other services is E-junkie pre-integrated?
Please see the Tips pages linked below for complete details.