It took me about 2 days to integrate Paypal Pro and I am not very technical person, if I can don’t it so can you. Don’t be discourage, just follow these steps below. Disclosure: these are not my files
Step 1: Download and unzip the two files “Pear and Paypal” into your hard drive
Step 2: Upload these files on to your website using FTP.
For “Paypal” files go into /public_html/yourwebsite/administrator/components/com_virtuemart/classes/payment/(current folder)
→ paypal_dp
---ps_pdp.cfg.php
---ps_pdp.php
For “Pear” files go into
/public_html/yourwebsite/Pear/(current folder)
→ .registry folder
→ Archive
→ Console
→ HTTP
→ Log
→ Net
→ PEAR
→ Services
-- Log.php
-- PEAR.php
-- pearcmd.php
-- System.php
Step 3: One line configuration in your “php.ini” file; look for “php.ini” file in /public_html/yourwebsite/php.ini
About halfway down look for
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = “.:/usr/lib/php:/usr/local/lib/php”
make your include_path line look like this
include_path = “.:/usr/lib/php:/usr/local/lib/php:/home/public_html/yourwebsite/PEAR”
Step 4: Upload paypal keys live and sandbox cert_key_perm.txt (assume you already have an account with Paypal) to
/public_html/yourwebsite/pear/Services/Paypal/cert/(current folder)
---live.cert_key_perm.txt
---sandbox.cert_key_perm.txt
Step 5: Configurate Payment Methods
1. Log into Virtuemart
2. Go to List Payment Methods and click New top right
On General Tab
3. Active? Check the box to make it active
4. Payment Method Name: Type “Paypal Direct Payment” or anything you wish.
5. Code: Type “PDP”
6. Payment class name: Type “ps_pdp”
7. Payment method type: Click “Credit Card”
8. Accepted Credit Card Types: Click Visa, MC, A. Express, Discover Card
On Configuration Tab
9. Username: You get this from Paypal
10. Password: You get this from Paypal
11. Subject: You can leave this blank
12. Certificate: Insert url of your key here
13. Mode: Pick Sandbox for testing
14. CVV: Pick Yes
At this point your ps_pdp.cfg.php file should look like this
<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
define ('PDP_USERNAME', 'xxxxxxxxxx_api1.xxxxxxxxxxx.com');
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxx');
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/public_html/yourwebsite/pear/Services/PayPal/cert/sandbox.cert_key_pem.txt');
define ('PDP_MODE', 'sandbox');
define ('PDP_CHECK_CARD_CODE', 'YES'); you need to add this line in for CVV
?>
Step 6: Testing Paypal Payment Pro
Make sure that you set your frontend features to allow customer to select their State/Region when fill out Billing and Shipping Address. Otherwise you would get this error
object(errortype)(9) { ["_elements"]=> array(5) { ["ShortMessage"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(6) "string" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["LongMessage"]=> array(3) { ["required"]=> bool(false) ["type"]=> string(6) "string" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["ErrorCode"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(5) "token" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["SeverityCode"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(16) "SeverityCodeType" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["ErrorParameters"]=> array(3) { ["required"]=> bool(false) ["type"]=> string(18) "ErrorParameterType" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } } ["_attributes"]=> array(0) { } ["_attributeValues"]=> array(0) { } ["_namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" ["ShortMessage"]=> string(37) "The Billing Address State is invalid." ["LongMessage"]=> string(128) "The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code." ["ErrorCode"]=> string(5) "10751" ["SeverityCode"]=> string(5) "Error" ["ErrorParameters"]=> NULL }
Failure in Processing the Payment:
The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code.
Error: Failure in Processing the Payment (ps_pdp)
Failure in Processing the Payment:
The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code.
Step 7: Take it LIVE
Edit your ps_pdp.cfg.php file (if you edit from List Payment Method the last line, define ('PDP_CHECK_CARD_CODE', 'YES'); ,will drop off. I don't know why)
<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
define ('PDP_USERNAME', 'xxxxxxxxxx_api1.xxxxxxxxxxx.com'); real username
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxx'); real password
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/public_html/yourwebsite/pear/Services/PayPal/cert/live.cert_key_pem.txt');
define ('PDP_MODE', 'LIVE');
define ('PDP_CHECK_CARD_CODE', 'YES'); you need to add this line in for CVV
?>
I don't think I left anything out, but if you get this far you should be able to figure the rest out.
[attachment deleted by admin]