PayPal Website Payments Pro (US)

From AVACTIS : Ecommerce Shopping Cart Software Wiki
Jump to: navigation, search

In order to activate PayPal Website Payments Pro (US) you need the following:

1. SSL certificate. To use this payment option you must load your checkout pages via secure https connection. It requires SSL certificate installed on your domain. If you don't have one, purchase a certificate:

SSL Certificates

PayPal has the list of the companies-partners:

https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Marketing/merchant/CompatibleSSLCertPartner-outside

so, you should contact one of those companies and purchase the certificate. After you have done it, contact your hosting administrator and ask him to install the certificate.

2. PayPal professional account. If you have not created it yet, please go to the PayPal website and create the account:

http://www.paypal.com

3. After the PayPal account is created, go to the Avactis admin panel, click on the "Store settings" link, then click on the "Payment Methods" link. On the opened page, select "PayPal Website Payments Pro (US)" in the "Available Payment Methods" area and move it to "Selected Payment Methods". Click "Save".

After the page is reloaded, click on the "PayPal Website Payments Pro (US)" link. This will open a page where the module settings are listed. Fill out the fields:

API Certificate - upload the certificate file from your local PC.

You are able to download the certificate on the "API Access" page of your personal account at http://www.paypal.com web site. Save the file in your local PC, then upload it to Avactis using the "Browse" button.

API Username - your PayPal Pro API username

API Password - your PayPal Pro API password


Select "Production" in the "Transaction Mode" field. (In order to use Test mode you need to get additional accounts at PayPal Sandbox - https://developer.paypal.com/)

Select "Active" in the "Module Status" and click "Save". After that the "PayPal Website Payments Pro (US)" payment option will be available for the store customers.


NOTE: If your store does not update order payment statuses although PayPal accepts the payments, follow the instruction below.

Save a backup copy of the avactis-system\modules\payment_module_paypalpro_cc\payment_module_paypalpro_cc_api.php file.

Open your avactis-system\modules\payment_module_paypalpro_cc\payment_module_paypalpro_cc_api.php file.

1. Find the following line:

if (isset($response["Status"]))


and replace it with this one:


if (isset($response["Status"]) && !empty($response["Status"]))


2. Replace the following line:

if ($this->backgroundProcess("transactionSearch", $transactionData))

with this one:


if (true ) //$this->backgroundProcess("transactionSearch", $transactionData))


3. Find the following part of code:


elseif (isset($response["Ack"]) && $response["Ack"] == "Success")
{
$response["Status"] = "Completed";
}


and replace it with this one:


elseif (isset($response["Ack"]) && $response["Ack"] == "Success")
{
$response["Status"] = "Completed";
}
elseif (isset($response["Ack"]) && $response["Ack"] == "SuccessWithWarning")
{
$response["Status"] = "Pending";
}

4. Find the following line:

if (!$DataFields["ErrorCode"] && !$DataFields["ErrorShortMessage"] && !$DataFields["ErrorLongMessage"])

and replace it with this one:

if ((!$DataFields["ErrorCode"] && !$DataFields["ErrorShortMessage"] && !$DataFields["ErrorLongMessage"]) || (isset ($DataFields["ErrorCode"]) &&  
 $DataFields["ErrorCode"] == "11610"))