TIP: PayPal Auto Redirect back to Merchant site.

Discussion in 'Payments processing' started by microlinx, Mar 30, 2007.

  1. microlinx

    microlinx Member

    Joined:
    Oct 26, 2004
    Messages:
    268
    Hello all:

    Here's a tip to make you customer's payment process easier & more pleasant.
    This applies to PayPal_r plugin only.

    Problem:
    When the customer completes their payment, they may be prompted to click a button that says "Return to Merchant Site". Well, most customer's are too dang excited and wind up closing that page once they finish payment.

    To bring them back automatically, you need to log into your PayPal account, then click "Profile"> "Website Payment Preferences".
    Then, under "Auto Return for Website Payments", be sure the ON is selected.
    Under the return URL, enter: http://www.yourdomain.com/amember/thanks.php

    That will bring them back to your thank you page.

    Finally, you can do something else neat with your /templates/thanks.html page.
    Add the following code and they will be able to se their username and password right away.


    Here is the entire modified code for my thanks.html template page:


    PHP:
    <p>{assign var="title" value=$smarty.const._TPL_THX_TITLE} {include file="header.html"} <br>
    <
    strong>#_TPL_THX_ENJOY|<a href="{$config.root_url}/login.php" target="_blank">|</a>#</strong> 
      
    <br />
      <!-- 
    display payment receipt -->
      {if 
    $payment.amount "0.0"#_TPL_THX_PAYPROC# <br />
      #_TPL_THX_ORDERREF|{$payment.payment_id}|{$payment.receipt_id}#<br />
      #_TPL_THX_DATETIME|{$payment.tm_completed|date_format:$config.time_format}#<br />
      
    <br />
      
    Your username is: <b>{$member.login}</b><br>
      
    Your password is: <b>{$member.pass}</b><br>
      <
    br>
      IF 
    YOU DID NOT SEE A USERNAME PASSWORD ABOVE: <br>
      
    Some browsers and firewalls may prevent seeing that info on this page. <br>
      
    Don't panic, just check your e-mail inbox, a copy was also sent to you as a 
      backup. <br>
      If you have any problems, please see <a href="http://www.yourdomain.com/support">The 
      Support Page</a</p><br>
    <table class="receipt">
    <tr>
        <th>#_TPL_THX_PRDTITLE#</th>
        <th style="width: 10%; text-align: right;">#_TPL_THX_PRICE#</th>
    </tr>
    {foreach from=$products item=p}
    <tr>
        <td>{$p.title}</td>
        <td style="text-align: right">{$config.currency|default:"$"}{$p.price}</td>
    </tr>
    {/foreach}
    <tr>
        <td class="total"><strong>#_TPL_THX_SUBTOTAL#</strong></td>
        <td class="total" style="text-align: right"><strong>{$config.currency|default:"$"}{$subtotal|string_format:"%.2f"}</strong></td>
    </tr>
    {if $payment.data.COUPON_DISCOUNT ne "" }
    <tr>
        <td><strong>#_TPL_THX_DISCOUNT#</strong></td>
        <td style="text-align: right"><strong>{$config.currency|default:"$"}{$payment.data.COUPON_DISCOUNT|string_format:"%.2f"}</strong></td>
    </tr>
    {/if}
    {if $payment.tax_amount ne ""}
    <tr>
        <td><strong>#_TPL_THX_TAX#</strong></td>
        <td style="text-align: right"><strong>{$config.currency|default:"$"}{$payment.tax_amount|string_format:"%.2f"}</strong></td>
    </tr>
    {/if}
    <tr>
        <td class="total"><strong>#_TPL_THX_TOTAL#</strong></td>
        <td class="total" style="text-align: right"><strong>{$config.currency|default:"$"}{$total|string_format:"%.2f"}</strong></td>
    </tr>
    </table><br>
    <p><strong>PLEASE PRINT THIS PAGE FOR YOUR RECORDS</strong></p><br />
    <p><br />
      {/if}{* END Of receipt display *} {include file="footer.html"}</p>

    Alex, if you something wrong with doing this, please let me know.

Share This Page