Announcement

Collapse
No announcement yet.

integrating PAP with Paypal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • integrating PAP with Paypal

    I'm using an Advanced Button, so when my customer click this button, he will be directed to Paypal. I simply add the email link given by Paypal to the "OnClick Value" of this Advanced button. It works perfectly.

    Now I'm adding my affiliate program created using PAP. I intend to integrate my affiliate program with Paypal's IPN so that the back end process can be automized.

    The problem is in order to integrate the affiliate program and Paypal, I need to add some html and script to my Advanced Button. I tried adding it to my Advanced Button's html page/Inside Tag, it doesn't work. How can I add the html and script to my Advanced Button so that cookie can be tracked and PAP and Paypal can "communicate"?

    Please find attached a copy of what PAP wants me to do with Paypal integration.
    http://www.r2rwealthsecrets.com

  • #2
    Re: integrating PAP with Paypal

    First, Where is the attached copy ?

    Secondly: You normally copy the paypal code(which includes the paypal button) to an html box and then move the box to whever you need it on the page.................

    Please clarify your question.
    Have fun
    Regards..... David

    Step by Step Visual Tutorials for the complete beginner
    Newbies / Beginners Forum
    FREE Membership Login Scripts: - Meta Tags Analyzer
    My Social Networking Site - Free Contact Forms
    Finished your New website!! Now get it noticed Here:

    Comment


    • #3
      Re: integrating PAP with Paypal

      sorry the attachment was there when I checked it, but then it just disappear. will attach it again.

      Pls go to www.horsedummies.com/disclaimer.html.

      After reading the disclaimer, the customer will decide whether "I Disagree" or " I Agree". These two buttons are created using the "Advanced" Button under the Form Tool. When the customer click "I Agree", he will directly go to paypal. In another word, this "I Agree" button works like Paypal button, similar to the one you are referring to. The difference is instead of using the html code given by paypal, I used the code for email purpose, also given by paypal (if you don't have encrypted button).

      In order to link "I Agree" button to paypal, I go to "properties" of the button. Select "Navigate to the specified URL" for the OnClick Action. Then In the OnClick Value, I entered the email code given by paypal.

      It works alright for me. But now I need to incorporate PAP with Paypal and that's where the problem arises...

      Hope this clarify my situation better.
      http://www.r2rwealthsecrets.com

      Comment


      • #4
        Re: integrating PAP with Paypal

        The attachment is gone again. I have cut n paste the content from the PAP manual below.

        PayPal

        To integrate Post Affiliate Pro with PayPal you can use PayPal IPN callback
        feature.
        First thing you have to do is to pass affiliate information to the PayPal button, so that it will be sent when user clicks on this button to pay.
        Also, you should let PayPal know that it should call back your script.
        You can do it by putting hidden fields:

        <input type=hidden name="notify_url"
        value="http://www.yoursite.com/affiliate/scripts/paypal.php">
        <input type=hidden name="custom" value="cookiedata">

        into the PayPal button form. This will tell PayPal that it should silently
        call http://www.yoursite.com/affiliate/scripts/paypal.php script upon
        every sale, and it will pass all sale variables including the custom field to this script.

        cookiedata is the variable that you have to get from the cookie.
        To get its value from the cookie, you can use either PHP code (if your page has .php extension), or JavaScript function (if it is HTML page).

        Example with JavaScript code:
        <SCRIPT>
        function getCookie(name)
        {
        var nameequals = name + "=";
        var beginpos = 0;
        var beginpos2 = 0;
        while (beginpos < document.cookie.length)
        {
        beginpos2 = beginpos + name.length + 1;
        if (document.cookie.substring(beginpos, beginpos2) == nameequals)
        {
        var endpos = document.cookie.indexOf (";", beginpos2);
        if (endpos == -1)
        endpos = document.cookie.length;
        return unescape(document.cookie.substring(beginpos2, endpos));
        }
        beginpos = document.cookie.indexOf(" ", beginpos) + 1;
        if (beginpos == 0)
        break;
        }
        return null;
        }
        </SCRIPT>
        <!-- Begin PayPal Button -->
        <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
        <input type="hidden" name="cmd" value="_xclick">
        <input type="hidden" name="business" value="paypalemail@yoursite.com">
        <input type="hidden" name="undefined_quantity" value="1">
        <input type="hidden" name="item_name" value="Product Name">
        <input type="hidden" name="amount" value="19.95">

        <input type="hidden" name="image_url"
        value="https://yoursite.com/images/paypaltitle.gif">
        <input type="hidden" name="no_shipping" value="1">
        <input type="hidden" name="return"
        value="http://www.yoursite.com/paypalthanks.html">
        <input type="hidden" name="cancel_return" value="http://www.yoursite.com">
        <input type="hidden" name="notify_url"
        value="http://www.yoursite.com/affiliate/scripts/paypal.php">
        <script>
        document.write("<input type='hidden' name='custom'
        value='"+getCookie('POSTAff2Cookie')+"'>");
        </script>
        <input type="image" src="http://images.paypal.com/images/x-clickbut5.
        gif" border="0" name="submit">
        </form>
        <!-- End PayPal Button -->

        If you have more than one paypal buttons on your page, you can put the
        JavaScript code for function getCookie() to your page only once, between the <HEAD>...</HEAD> tags.
        http://www.r2rwealthsecrets.com

        Comment

        Working...
        X