PayPal Website Payments Pro

What is PayPal?

PayPal is the safer, easier way to pay online without revealing your credit card number.

What is PayPal Website Payments Pro?

Website Payments Pro includes Direct Payment, Express Checkout, and additional PayPal solutions and tools, such as Virtual Terminal, Fraud Management Filters, and reference transactions.

PayPal Website Payments Pro Settings

To start processing online payments with PayPal you need to register a new account; it’s free. Jump over to Setting up a PayPal Website Payments Pro account for a detailed explanation on signing up with PayPal, otherwise, continue reading to setup the PayPal Website Payments Pro payment option within WP e-Commerce.

  1. Open Settings > Store > Payments from the WordPress Administration menu
  2. Under General Settings check the box beside PayPal – Website Payments Pro
  3. Save changes by clicking Update
  4. Hover your mouse over the PayPal – Website Payments Pro line and click Edit
  5. Under API Username provide your PayPal generated API Username provided within PayPal’s website on the My Account > Profile > API Access > View API Signature page
  6. Under API Password provide your PayPal generated API Password provided within PayPal’s website on the My Account > Profile > API Access > View API Signature page
  7. Under API Signature provide your PayPal generated API Signature provided within PayPal’s website on the My Account > Profile > API Access > View API Signature page
  8. Save changes by clicking Update within the payment options dialog

Setting up a PayPal Website Payments Pro account

To enable WP e-Commerce to perform at its best you need to setup a a Verified PayPal Business Account. If you have an existing Personal account with PayPal, you can upgrade your account to a Business account. A Business Account is needed for PayPal to communicate with your WP e-Commerce store.

Debugging PayPal Pro

note: these steps are only recommended for people who have a know how in simple php, if these steps seems scary to you then please don’t try and follow them contact Premium Support and they will help you with your errors.

Checking the data that is getting sent to PayPAl

This is an important step if your having errors then you will need to know what you data looks like so you can check its in the correct format, PayPal will also return some error codes which we will get out in the next section. You will need both the Data and the Error codes to troubleshoot

1. Open the paypal pro merchant file (wp-content/plugins/wp-e-commerce/wpsc-merchants/paypal-pro.merchant.php)

2. Find the function <pre>construct_value_array()</pre> at the bottom of that you want to add the following code

[php] exit(‘<pre>’.print_r($data,1).’</pre>’);[/php]

Your code should now look like the screenshot below:

Ok save that file your first lot of Debug code is in place! So to use it…

3. Add something to your cart and head to your checkout page – fill out all your details (correctly) credit card number etc and hit checkout.

4. You will be presented with a big data array on a white screen – this is the data that your trying to send to checkout so copy that entire thing and go back to your code.

5. VERY IMPORTANT : delete the exit debug data you put in at step 2 (if you don’t do this then your customers will be greeted with the same data)

Checking the response from PayPAl

Ok so you know what data is been sent but what is the error this next step will intercept the error codes returned from PayPal.

1. Open the paypal pro merchant file (wp-content/plugins/wp-e-commerce/wpsc-merchants/paypal-pro.merchant.php)

2. Find the function <pre>parse_gateway_notification</pre> at the bottom of that you want to add the following code

[php] exit(‘<pre>’.print_r($response,1).’</pre>’);[/php]

Your code should now look like the screenshot below:

Ok save that file your error debug code is now ready to run

3. Add something to your cart and head to your checkout page – fill out all your details (correctly) credit card number etc and hit checkout.

4. You will be presented with another array in that will be a list of error codes and messages, you can look the error codes up here to find the exact problem. you already have the data ready so you should be able to compare the two.

5. Don’t forget to comment this exit back out when you have recorded your error codes!

 

Comments are closed.
KIWI