Previous Topic

Book Contents

PayPal Website Payments Pro and Express Checkout

You will receive the PayPal Website Payments Pro and Express Checkout (PayPal Pro) either as an independent plugin or as a part of the transaction processing plugin.

Received as a separate independent download (Interim release)

  1. Double-click on the file SCPayPalEC.exe. This will execute the self-extractor which will unzip the files into the folder you specify.
  2. Startup your website design tool and import and overwrite all files, EXCEPT for the tp.asax file, from the /cgi-bin installation subfolder into your respective /cgi-bin folder on your website. Some of these files will overwrite your existing checkout pages. If you have modified them earlier, you will need to redo your changes on these new pages. You may wish to backup your existing checkout pages before hand.
  3. Import all files from the /bin subfolder into your respective /bin folder on your website. Overwrite any files when prompted.

Enabling Express Checkout

Step 1: Configuring PayPal.

  1. Log into your PayPal account.
  2. Click on Profile from the Home Menu.
  3. Under Account Information>>Chose API Access.
  4. Click on Request API Credentials.
  5. Choose API Signature as the credential type.
  6. Enable the checkbox and agree to the license Terms-I agree to the API Certificate Terms of Use and terms incorporated therein and press the Submit button

Step 2 Configuring SalesCart for your PayPal API.

To configure Express checkout, you will need to edit the file paypal_init.asax file for your particular store settings. By default, the file looks as follows:

Default Settings

<script runat="server">

' Copyright (c) 2007 ComCity. All Rights Reserved

' SalesCart 7

'

' File: paypal_init.asax

' Version: 1.0

' ASP file that specified Transaction Processing Variables for PayPal Express

'

' Set the type of processor

Sub SetPPVars()

' PPExpress. PayPal Standard = 0; PayPal Websites Payments PRO w/PayPal Express is 1.

Session ("PPExpress") = 1

' PayPal Username

Session ("PPUser") = "Your PayPal API User name"

' PayPal Pwd

Session ("PPPassword") = "Your PayPal API Password"

' PayPal Signature

Session ("PPSignature") = "Your PayPal API Signature"

 

' TxtMode: Specify the type of Processing you perform (default=AUTH_CAPTURE)

Session ("PPMode") = "Sale"

' PPCurrencyCode: Currency Code (default=USD

Session ("PPCurrencyCode") = "USD"

' PPDescription: Specify the Description that should be shown for orders placed via this mechanism

Session ("PPDescription") = "Automatically Generated SalesCart Order for PayPal Express"

' PPReturnURL: Specify the receipt page to show upon a successful transaction. (default=receipt2.aspx)

Session ("PPReturnURL") = "https://www.yourdomain.com/cgi-bin/PPShipping1.aspx"

' PPReturnURL2: Specify the receipt page to show upon a successful transaction. (default=receipt2.aspx)

Session ("PPReturnURL2") = "https://www.yourdomain.com/cgi-bin/EndPayPal.aspx"

' PPCancelURL: Specify the Failure page to show upon an unsuccessful transaction. (default=authfail.aspx

Session ("PPCancelURL") = "https://www.yourdomain.com/cgi-bin/view1.aspx"

' PPFailURL: Specify the Failure page to show upon an unsuccessful transaction. (default=authfail.aspx

Session ("PPFailURL") = "https://www.yourdomain.com/cgi-bin/authfail.aspx"

' PPConfirmShip: True/False. Require the shipping address on File be a confirmed address (default=True)

Session ("PPConfirmShip") = "0"

' PPToken. Set programmatically.

Session ("PPToken") = ""

' PPPayerID. Set programmatically.

Session ("PPPayerID") = ""

' PPVersion. PPVersion

Session ("PPVersion") = "2.3"

' PPPostURL: Specify the URL for your Processor

' SandBox Testing: https://api-3t.sandbox.paypal.com/nvp

' Live: https://api-3t.paypal.com/nvp

Session ("PPPostURL") = "https://api-3t.paypal.com/nvp"

' PPRedirectURL: Specify the URL for your Processor

' SandBox Testing: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd= express-checkout&token=

' Live: https://www.paypal.com/cgi-bin/webscr?cmd= express-checkout&token=

Session ("PPRedirectURL") = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="

End Sub

</script>

Setting the PayPal Credentials

The file is composed of a number of variables that direct how to process using PayPal. Most of these values you will not change. Each of these variables are set to specific values. You will edit only the values on the right of an "=" sign and only between the quotes to your particular store values.

  1. First, you will need to obtain your PayPal API User name, PayPal API Password and PayPal API Signature from your PayPal account and specify each of these 3 values. These values were established in Step 1 in your PayPal Profile.
  2. Cut and paste each of the values from your PayPal account into the file for PPUser, PayPal Pwd, and PayPal Signature.
  3. See the example below as edited with some example data that demonstrates how this has been accomplised.

PayPal Express Checkout Example Settings

' PayPal Username

Session ("PPUser") = "business_api1.somecorporation.com"

' PayPal Pwd

Session ("PPPassword") = "GCQQE5X5CUT9SZW3"

' PayPal Signature

Session ("PPSignature") = "AgpzOUBnTeXzjZf1SWysZ8mdUE8QqE5XfECf9dEWxcEYnriIVXz.1QU"

Setting the PayPal Return URLs

  1. Now, you will need to specify the particular URL's for your website domain were PayPal should return when processing.
  2. The specific page names/addresses for these URL's remain the same, you will simply change the particular domain or IP address you wish to receive the responses to for your particular application.
  3. See the example below as edited with some example data that demonstrates how this is done. In this case we have changed the Yourdomain.com to website.com. You will specify your own website domain name in place of "yourdomain".

PayPal Express Checkout Example Settings

' PPReturnURL: Specify the receipt page to show upon a successful transaction. (default=receipt2.aspx)

Session ("PPReturnURL") = "https://www.website.com/cgi-bin/PPShipping1.aspx"

' PPReturnURL2: Specify the receipt page to show upon a successful transaction. (default=receipt2.aspx)

Session ("PPReturnURL2") = "https://www.website.com/cgi-bin/EndPayPal.aspx"

' PPCancelURL: Specify the Failure page to show upon an unsuccessful transaction. (default=authfail.aspx

Session ("PPCancelURL") = "https://www.website.com/cgi-bin/view1.aspx"

' PPFailURL: Specify the Failure page to show upon an unsuccessful transaction. (default=authfail.aspx

Session ("PPFailURL") = "https://www.website.com/cgi-bin/authfail.aspx"

 

Enabling DirectPay

Step 1: Configuring PayPal.

You must enable Website Payments Pro in your PayPal account to process credit cards directly with PayPal without a merchant account. You must enable and configure the Express Checkout described above for PayPal, or DirectPay won't work.

  1. Contact PayPal to enable Website Payments Pro with DoDirectPay.
  2. PayPal requires that you use Express Checkout with Website Payments Pro. (Follow the steps above to enable Express Checkout.)
  3. Once you have completed those steps, you are ready to turn on this option in SalesCart.
  4. Copy the file tp.asax from the installation setup folder to your /cgi-bin folder.
  5. Or, as an alterative, you may edit your existing tp.asax file and change the value for TP-type to the value 13 as shown below. You must have installed the updated ctp.dll and scpaypal.dll into your /bin folder as well.
    Session("TP-Type") = 13.
  6. Ignore the other values in this file as they are not used. The values in the PayPal_Init.aspx are used preferentially.

PayPal Website Payments Pro Direct Pay Default Settings

<script runat="server">

' Copyright (c) 2007 ComCity. All Rights Reserved

' SalesCart 3.0

'

' File: tp.asa

' Version: 1.0

' ASP file that specified Transaction Processing Variables

'

' DO NOT CHANGE- UNLESS YOU REALLY KNOW WHAT YOU'RE DOING!

' Set the type of processor

Sub SetTPVars()

Session("TP-Type") = 13

' TxtLogin: Specify your Processing Login or UserID

Session ("TxtLogin") = "your_login"

' TxtPassword: Specify your Processing Password or Transaction Key(if applicable)

Session ("TxtPassword") = "your_transkey"

' TxtPostURL: Specify the URL for your Processor

Session ("TxtPostURL") = "https://secure.authorize.net/gateway/transact.dll"

' TxtTestRequest: Specify whether you are in testing mode (TRUE) or Live (FALSE). (default=TRUE)

Session ("TxtTestRequest") = "TRUE"

' TxtMode: Specify the type of Processing you perform (default=AUTH_CAPTURE)

Session ("TxtMode") = "Auth_Capture"

' TxtDescription: Specify the Description that should be shown for orders placed via this mechanism

Session ("TxtDescription") = "Automatically Generated SalesCart Order"

' TxtReturnURL: Specify the receipt page to show upon a successful transaction. (default=receipt2.aspx)

Session ("TxtReturnURL") = "receipt2.aspx"

' TxtFailURL: Specify the Failure page to show upon an unsuccessful transaction. (default=authfail.aspx

Session ("TxtFailURL") = "authfail.aspx"

End Sub

</script>

See Also

The TP Bridge Wizard

AuthorizeNet Wizard Instructions

ClearCommerce/eFunds/PayFuse/BarclayCard Wizard Instructions

LinkPoint/SurePay/YourPay Wizard Instructions

VeriSign PayFlow Pro

CyberSource/Bank of America Wizard Instructions

Echo

PayJunction Wizard Instructions