Skip to main content

Payment Gateways

2 min readApplies to every PremiumPress theme · 12.x

Payment Gateways

This page is all about taking payments on your site.

How payment gateways work​

Payment gateways are separate plugins, not part of the theme. The theme looks after the checkout, your orders and the settings screen. The gateway plugin connects your site to PayPal, Stripe or whichever company handles the payment.

We've done it this way on purpose. You only install the gateway you actually use, and we can update a gateway without touching your theme.

You can download the gateway plugins from premiumpress.com/plugins.

Setting one up​

  1. Download the gateway plugin for your payment company.
  2. Install and activate it under Plugins → Add New → Upload Plugin.
  3. Go to Checkout → Payment gateways.
  4. You'll now see the gateway on the Gateways tab. Enter its details and switch it on.

Each gateway has its own boxes to fill in. Most ask for an API key, or a client ID and secret, and have a switch between sandbox and live.

Testing before you go live​

Most gateways have a sandbox or test mode. We'd really recommend using it, and placing a full order from start to finish before you take real payments. Check that the order shows under Checkout → All Orders, and that the customer gets the confirmation email.

The theme also comes with a test gateway, so you can try out the checkout without a payment company at all. Please make sure it's switched off on a live site, because it marks orders as paid without taking any money.

Which gateway do I need?​

You can use any payment company that has a plugin on our plugins page. If yours isn't listed, just get in touch. We'll make the plugin for you free of charge, and it usually takes 7–10 working days.

If members sell through your site, Stripe can also pay your sellers their share for you. See Stripe Connect.

What people are paying for​

Gateways only handle the payment step. What you're actually selling, such as listing packages, upgrades, memberships or credits, is set up separately in Monetize.

For developers​

A plugin adds a gateway through the ppt_payment_gateways filter, which gives its id, name and settings fields. The payment itself runs through ppt_gateway_start and ppt_gateway_verify, which every checkout in the theme shares. Listings, memberships, credits and bookings all use the same pair. You'll find the full details, with working examples, in Writing a payment gateway.