PayPal Pro gateway for WordPress

28/08/2009

ZetaPrints web-to-print system has a choice of PayPal hosted payments page or a custom payments provider using an external gateway. We implemented an open source WordPress plugin for taking payment via PayPal’s PayFlow Pro.

Download location: http://wordpress.org/extend/plugins/paypal-pro-zp-gateway/

PayPal Pro and web-to-print

PayPal Pro and web-to-print

Requirements

  • WordPress with SSL certificate
  • PayPal PayFlow Pro account

You need to have a website running WordPress. ZetaPrints web-to-print software provides only online ordering functionality and it’s likely you have another “about us” type of website for your company. This plugin can only be used with such websites running on WordPress.

Taking customer credit card details requires a secure connection. You need to purchase and install an SSL certificate for the site where the plugin will be installed. The payments page must be accessible via HTTPS protocol only.

Installation

Warning: it is better to use help of someone familiar with WordPress administration.

  1. Log in to your WordPress website as an admin and nvaigate to Plugins/Add New page.
  2. Type in zetaprints in the search box
  3. Choose PayPalPro ZetaPrints Gateway plugin from the list of results and click Install
  4. Activate the plugin

You may need to de-activate and uninstall the plugin if you see any error messages or your website may become un-operational.

Configuration

The plugin needs to be configured at both ends: in WordPress and in your ZetaPrints web-to-print portal. ZetaPrints configuration is described in Payment gateways help post.

To configure the plugin, go to your WordPress admin section and navigate to Settings/PayPalPro gateway page.

  • Enter PayPal Pro parameters from PayPal website.
  • Enter your web-to-print API key into ZetaPrints API key text box.
  • Enter email details for failure reports and .
  • Click Update settings button.

Payments page creation

Create a post or a page to host the payments form. Format the page the way you want and insert shortcode [paypalpro] where you want the payments form to appear. Simply enter it as it appears here, in square brackets: [paypalpro]. WordPress will substitute the shortcode with a proper form generated by the plugin.

Publish the page/post and use the absolute URL (permalink, including https:// prefix) as your gateway URL in ZetaPrints configuration. If the URL has http:// prefix you need to change it to https://.

You can modify the look of the form by editing plugin’s CSS. Do not do this unless you know where to find the file. Consider getting professional assistance for this task.

How the plugin works

  • A user is redirected from your web-to-print portal to the payments page. Necessary transaction data is passed on with the request.
  • The user enters credit card details into the form on your WordPress site.
  • The plugin sends the data to PayPal. The result can be success, pending, declined, etc.
  • If PayPal’s response is negative the user is asked to correct the input and submit again or cancel and return to your web-to-print portal.
  • If PayPal’s response is positive the plugin sends a specially crafted request to ZetaPrints with transaction ID as a confirmation and redirects the user back to your web-to-print portal.

Notification emails

The confirmation request from the plugin to ZetaPrints is a weak link. If it fails the order remains unpaid in ZetaPrints database. You should get an automated email sent by the plugin for any failures. More on the interaction is in plugin’s documentation.

A successful transaction is confirmed in an email sent to the web-to-print user.

You can modify the content of the emails on plugin’s configuration page.

Direct payments

The plugin will not accept payments unless the user is referred to it from your web-to-print portal with sufficient purchase details (product, quantity, transaction id, etc.)

Demo page

We made a demo page with a payments form using this plugin.

See also: