Results 1 to 19 of 19
  1. #1
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    Arrow Shareasale help
    Hi all,

    I am on the edge of joining shareasale - I intend to join although not yet set-up with the tracking code.

    I sell one product through Paypal in four different currencies. I am wondering why there isn't an example or standard cut and paste code to help with installing? I've looked around the help pages but cant see any?

    Is setting up with Paypal difficult?

    I have spent the last day waiting for help - I'm eager to get started!

    Any code gurus that can help me out until tech support gets to me?

    Also after a step by step manual on how to really get this going, is it just the same as getting backlinks or what other skills and techniques can be applied?

    Anyway - hello to all and goodluck!

    martialarm.com

  2. #2
    ABW Founder Haiko de Poel, Jr.'s Avatar
    Join Date
    January 18th, 2005
    Location
    New York
    Posts
    21,609
    Hi and welcome to ABW martialarm! :

    Take a look at http://forum.abestweb.com/showthread.php?t=48323
    Continued Success,

    Haiko
    The secret of success is constancy of purpose ~ Disraeli

  3. #3
    Affiliate/AM Moonlighter dflsports's Avatar
    Join Date
    January 17th, 2005
    Posts
    874
    Cool product. I'll show my TKD school it.

  4. #4
    AM Navigator Geno Prussakov's Avatar
    Join Date
    May 10th, 2005
    Location
    Washington D.C. Metro Area
    Posts
    11,798
    Yes, this is a great product! Congratulations on it and welcome to the forum!

    Geno

  5. #5
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    Thanks for the positive comments - you are all welcome to sign up when I'm technically done


    This is the code given by paypal
    .................................................


    // read the post from PayPal system and add 'cmd'
    $req = 'cmd=_notify-synch';

    $tx_token = $_GET['tx'];
    $auth_token = "GX_sTf5bW3wxRfFEbgofs88nQxvMQ7nsI8m21rzNESnl_79ccFTWj2aPgQ0";
    $req .= "&tx=$tx_token&at=$auth_token";

    // post back to PayPal system to validate
    $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
    $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
    $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
    // If possible, securely post back to paypal using HTTPS
    // Your PHP server will need to be SSL enabled
    // $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

    if (!$fp) {
    // HTTP ERROR
    } else {
    fputs ($fp, $header . $req);
    // read the body data
    $res = '';
    $headerdone = false;
    while (!feof($fp)) {
    $line = fgets ($fp, 1024);
    if (strcmp($line, "\r\n") == 0) {
    // read the header
    $headerdone = true;
    }
    else if ($headerdone)
    {
    // header has been read. now read the contents
    $res .= $line;
    }
    }

    // parse the data
    $lines = explode("\n", $res);
    $keyarray = array();
    if (strcmp ($lines[0], "SUCCESS") == 0) {
    for ($i=1; $i list($key,$val) = explode("=", $lines[$i]);
    $keyarray[urldecode($key)] = urldecode($val);
    }
    // check the payment_status is Completed
    // check that txn_id has not been previously processed
    // check that receiver_email is your Primary PayPal email
    // check that payment_amount/payment_currency are correct
    // process payment
    $firstname = $keyarray['first_name'];
    $lastname = $keyarray['last_name'];
    $itemname = $keyarray['item_name'];
    $amount = $keyarray['payment_gross'];

    echo ("

    Thank you for your purchase!

    ");

    echo ("Payment Details
    \n");
    echo ("
  6. Name: $firstname $lastname
  7. \n");
    echo ("
  8. Item: $itemname
  9. \n");
    echo ("
  10. Amount: $amount
  11. \n");
    echo ("");
    }
    else if (strcmp ($lines[0], "FAIL") == 0) {
    // log for manual investigation
    }

    }

    fclose ($fp);

    ?>



    This is the code given by Sharasale

    .................................



    As far as I understand they have to merge their information and Paypay needs to have 3 things done. I think???

    Auto return
    PDT and IPN turned on
    Thankyou page set up and placed in auto return

    DOES THAT COVER IT?

    My ideal situation would be a pre-customer clicks on affiliate banner, goes to my site while getting cookie. Clicks on buy button and goes to paypal. Fills in credit card and is seemlessly transferred to my thankyou page where all pertanent data is displayed. Data goes to shareasale and then I get two emails

    1> from shareasale confirming sale and details and
    2> one from paypal to varify.

    If anyone can help with this it would be appreciated for all paypal potentials for shareasale.

    Bye for now!

    martialarm

  12. #6
    Affiliate/AM Moonlighter dflsports's Avatar
    Join Date
    January 17th, 2005
    Posts
    874
    Have you looked at http://www.mals-e.com/, its a nice cart and it works with SAS if you upgrade to the paid version, I think I pay like $33 every 6 months for the upgraded cart.

  13. #7
    Animal Lover
    Join Date
    January 18th, 2005
    Location
    oz
    Posts
    1,210
    PHP Code:
    if (strcmp ($lines[0], "SUCCESS") == 0) {
    for (
    $i=1$i list($key,$val) = explode("="$lines[$i]);
    $keyarray[urldecode($key)] = urldecode($val);
    }
    // check the payment_status is Completed
    // check that txn_id has not been previously processed
    // check that receiver_email is your Primary PayPal email
    // check that payment_amount/payment_currency are correct
    // process payment
    $firstname $keyarray['first_name'];
    $lastname $keyarray['last_name'];
    $itemname $keyarray['item_name'];
    $amount $keyarray['payment_gross'];

    echo (
    "

    Thank you for your purchase!

    "
    );

    echo (
    "Payment Details
    \n"
    );
    echo (
    "
    Name: 
    $firstname $lastname\n");
    echo (
    "
    Item: 
    $itemname\n");
    echo (
    "
    Amount: 
    $amount\n");
    echo (
    "");

    This is the bit of code you want to tinker with if you're after a redirect to a thank you page - although this bit of code already does that for you ie the thank you for you purchase bit.

    I'm not exactly sure what info you need to send to SAS to confirm the sale but a simple mail command should send them an email automatically if that's what you are after...paypal usually sends you an email confirming the purchase automatically anyway so I don't think you need to code that in here?

    this bit of code added into the above will send an email to sas with the details as listed above. if you need to send other stuff eg affilids etc then it's harder to code.

    PHP Code:
    $toadd="<SASEMAIL>";
    $fromadd="From: <YOUREMAIL>";
    $subject="Sale confirmation";
    $message="Payment details from MartiAlarm.com \n"
                   
    .$itemname." sold \n"
                   
    ."Sale amount ".$amount."\n";
    mail ($toadd,$subject,$message,$fromadd); 
    Not sure if that's what you are after,
    Oscar

  14. #8
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    Hi Guys,

    Thanks for the help.

    The reason I went with paypal is that I only have one product and deal in all the currencies so I dont really need a shopping cart..Unless I can be shown otherwise.

    It just seems paypal and shareasale should be easily incorporated and standardized for a one off one product click sale.

    Also thanks for the above post on the code if this is what I hope to achieve what do I have to do to get it? (see below)

    I would of thought there would be a simple 'do this, then do that' guild or manual?

    ...................................

    My ideal situation would be a pre-customer clicks on affiliate banner, goes to my site while getting cookie. Clicks on buy button and goes to paypal. Fills in credit card and is seemlessly transferred to my thankyou page where all pertanent data is displayed.

    Data goes to shareasale and then I get two emails

    1> from shareasale confirming sale and details and
    2> one from paypal to varify.

    Then..
    3> affiliate gets his money
    4> paypal records our money

    If anyone can help with this it would be appreciated for all paypal potentials for shareasale.

    Please private message me and we could look at my thankyou page set up!

    Regards

    martialarm

  15. #9
    Animal Lover
    Join Date
    January 18th, 2005
    Location
    oz
    Posts
    1,210
    I think you are going to need input from Brian (SAS) to get it running. Are you going to offer a certain cookie length? eg 15 day cookie and if the customer returns to buy from your site the affiliate still gets credited? If you aren't then session controls with php is possible to keep track of the session and to keep certain parameters eg the affiliate's ID number in the session parameters and you can then send it to SAS after the 'successful' transaction from Paypal. I've never fiddled with cookies in php so it's a bit beyond me.

    Is that bit of code in your paypal button? I've never noticed that much code in my paypal buttons before...but then again I haven't looked at Paypal for a while now.

    Oscar

  16. #10
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    Yes I intend to have a 60 day cookie. But I think this is run by the shareasale set up.

    The above code is the php script that goes into the thankyou page.

    So there is a button script for the sale page. Made by PayPal.

    Then a pgp script on the thankyou page with the shareasale script.

    So I have the two scripts but I'm not sure what parts of these need to be individualised so my affiliates do get the credit.

    Im waiting for a reply from sharasale but it is well after hours so I will see tomorrow.

  17. #11
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    Hi All,

    I got the paypal script to work now on my thankyou page and set up a whole range of details regarding the purchase

    Payment Details
    Name:
    Email:
    Quantity:
    Item:
    Amount:
    Currency:
    Status:

    The main things I was doing wrong was you need to replace the personal issued token that is given to you on PDT set up and place it in the paypal issued standard script. You also need to have a validated email address.

    Then I signed up for the paypal sandbox test area and made a seller account and buyer account and tested it and its fine. change the url from www.paypal.com to www.sandbox.paypal.com for the test.

    If anyone needs help on very basic paypal PDT set up let me know.

    I now need to incorporate this data that I get placed on this page into my shareasale script which I think will be easy but Im waiting for tech services.

    http://www.martialarm.com/hidden/test.phtml

    If anyone wants to test this set up go to this page and click one of the buy buttons ( I suggest the AUS .01 cents ) unless you are purchasing my product.

    This will run through an actual sale costing you .01 cents (although I'm not going to send you anything - and hoefully I'll make alot of 0.01 cents

    It will put you through a purchase and send you back to my thankyou page - test it out and I'll pull it down in a few days.

  18. #12
    Member KrisKringle's Avatar
    Join Date
    January 27th, 2005
    Location
    Colorado
    Posts
    90
    Talking
    [QUOTE=martialarm]
    If anyone needs help on very basic paypal PDT set up let me know.

    Thanks for the helpful thread (Haiko, too!)

    You are working on the exact problem I am. I'll watch for your test results.

    An overall summary would be very helpful, if it's not too much trouble.

    Thanks!

  19. #13
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    // read the post from PayPal system and add 'cmd'
    $req = 'cmd=_notify-synch';

    $tx_token = $_GET['tx'];
    $auth_token = "You need to place you token here!!!!";
    $req .= "&tx=$tx_token&at=$auth_token";

    // post back to PayPal system to validate
    $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
    $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
    $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
    // If possible, securely post back to paypal using HTTPS
    // Your PHP server will need to be SSL enabled
    // $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

    if (!$fp) {
    // HTTP ERROR
    } else {
    fputs ($fp, $header . $req);
    // read the body data
    $res = '';
    $headerdone = false;
    while (!feof($fp)) {
    $line = fgets ($fp, 1024);
    if (strcmp($line, "\r\n") == 0) {
    // read the header
    $headerdone = true;
    }
    else if ($headerdone)
    {
    // header has been read. now read the contents
    $res .= $line;
    }
    }

    // parse the data
    $lines = explode("\n", $res);
    $keyarray = array();
    if (strcmp ($lines[0], "SUCCESS") == 0) {
    for ($i=1; $i list($key,$val) = explode("=", $lines[$i]);
    $keyarray[urldecode($key)] = urldecode($val);
    }
    // check the payment_status is Completed
    // check that txn_id has not been previously processed
    // check that receiver_email is your Primary PayPal email
    // check that payment_amount/payment_currency are correct
    // process payment
    $number = $keyarray['txn_id'];
    $firstname = $keyarray['first_name'];
    $lastname = $keyarray['last_name'];
    $street = $keyarray['address_street'];
    $city = $keyarray['address_city'];
    $country = $keyarray['address_country'];
    $zip = $keyarray['address_zip'];
    $email = $keyarray['payer_email'];
    $quantity = $keyarray['quantity'];
    $itemname = $keyarray['item_name'];
    $amount = $keyarray['mc_gross'];
    $currency = $keyarray['mc_currency'];
    $exchange = $keyarray['settle_amount'];
    $status = $keyarray['payment_status'];

    // above is our required info
    echo ("

    Thank you for your purchase!

    ");

    // below is the displayed martialarm.com info
    echo ("Payment Details
    \n");
    echo ("
  20. ID: $number
  21. \n");
    echo ("
  22. Name: $firstname $lastname
  23. \n");
    echo ("
  24. Address: $street $city $country $zip
  25. \n");
    echo ("
  26. Email: $email
  27. \n");
    echo ("
  28. Quantity: $quantity
  29. \n");
    echo ("
  30. Item: $itemname
  31. \n");
    echo ("
  32. Amount: $amount
  33. \n");
    echo ("
  34. Currency: $currency
  35. \n");
    echo ("
  36. USD: $exchange
  37. \n");
    echo ("
  38. Status: $status
  39. \n");
    echo ("");
    }
    else if (strcmp ($lines[0], "FAIL") == 0) {
    // log for manual investigation
    }

    }

    fclose ($fp);

    ?>










    ................................

    So you get the PDT script on sign up and set up auto redirect to the page you will place the above script. You place your token inside where ""You need to place you token here!!!!""

    If you dont cahange the above it allows the sale in any language and give you alot of data on the buyer as seen in the echo part.


    Hope this helps!

    martialarm.com

  40. #14
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    for some reason when I posted it took out this vital part which is place right at the very top



  41. #15
    Newbie
    Join Date
    July 27th, 2005
    Location
    online
    Posts
    21
    it did it again ,,,

    so Ill try again
    its a bigger than sign (next to the 'm' on the keyboard) then, ?php

  42. #16
    Member KrisKringle's Avatar
    Join Date
    January 27th, 2005
    Location
    Colorado
    Posts
    90
    weird...my text email notification has the missing part at the top.... < ?php

    Also, does the gross amount sent to Shareasale for affiliate payout include or exclude postage and insurance? Can you exclude or just need to raise amount to net enough postage, etc after payout? ...or all inclusive pricing?

    Thanks again!

    Kris

  43. #17
    Affiliate Manager
    Join Date
    January 18th, 2005
    Posts
    53
    call dave he will help you

  44. #18
    AM Navigator Geno Prussakov's Avatar
    Join Date
    May 10th, 2005
    Location
    Washington D.C. Metro Area
    Posts
    11,798
    HAPPY BIRTHDAY to the starter of this thread (martialarm)!!!

    Geno

  45. #19
    Affiliate Manager
    Join Date
    January 18th, 2005
    Posts
    53
    OHHHHHHHH HAPPY BIRTHDAY !!!!martialarm!!!!!

  46. Newsletter Signup

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •