User Tools

Site Tools


howto:configure-paypal

Configure PayPal

To setup PayPal payment you will need a merchant account which you have to create on the website of PayPal self.

Configuration

Go to Periphery > Credit Card settings.

This is where payment types for credit card can be enabled and configured. Start by creating a new clearing house configuration.

There is a predefined configuration ‘PayPal’ available. Select this and most of the settings will be filled out for you.

Submit fields

You can print values of variables by putting them between ||-signs. Usable variables here are:

  • ||portal_url||
  • ||order_id||
  • ||amount||

The required fields are preset but you will have to change certain values:

  • Notify_url: Be sure to replace ‘x.x.x.x’ with your own IP-address. You can employ DNS but when combined with HTTPs make sure to use a valid certificate.
  • Return & cancel_return: These are pages that are found in your portal. If you created your own portal make sure these pages exist. Otherwise the subscriber will be redirected upon completion/failure (of payment) to a blank-page.
  • Currency_code: this can be set to other currency codes (PayPal Documentation: currency codes).
  • Business: This should be the e-mail address you've used to create the merchant account on PayPal.
  • Item name : Name of the item. This will appear on the PayPal invoice.
  • cbt: The text label used on the button when your payment has ended successfully.

Find a complete list of all optional fields here: HTML Variables for PayPal Payments Standard

Answer

The order identification is the variable that will be used to check what order was proceed. In this case that will be orderID.

In flow you can set the flow how a payment is checked and processed. Returned variables from PayPal can be used by wrapping your variable name in % symbols (eg. title becomes %title%). The proposed flow provides a minimal check: if payment_status returned and equals Completed then the payment was successful, otherwise it will return that it was unmatched.

Walled garden

The subscriber is still unauthenticated when he's about to make the payment. We need to assure the subscriber can reach the payment page (temporarily) but nothing else. A simple and quick solution would be to add the following entry: 0.0.0.0/0:443 to the walled-garden. This way the PayPal site will be accessible and don't forgot to limit the time (3-5 minutes).

Misc

Set a name for this config if there isn’t already one and save your settings.

Test the configuration

You can test your configuration by doing an actual payment but it's also possible to test these settings using PayPals sandbox, a live test environment.

You will have to create a sandbox account, even if you already have a regular PayPal account. To use PayPal Sandbox you need to adjust the configuration slightly:

  • Replace the value of the field url in your configuration with https://www.sandbox.paypal.com/cgi-bin/webscr. This will redirect you to the sandbox of PayPal rather than to the real site.
  • Replace the business with your new sandbox account.

When you submit these settings and you are back under Periphery > Credit card settings you click the first button under action, next to the Paypal clearing house option. Here you can enter whatever value you want and you can test if the payment takes place by using your sandbox account.

  • Note: Don’t forget to remove the ‘.sandbox’ from the url-field if you deploy the portal.

Troubleshoot

If a payment has been denied. Check the Payment Log under Tools > Logging > Payment log for:

  • fraud_managment_pending_filters_x
  • payer_status
  • payment_status
  • pending_reason
  • reason_code or reason_code_x

Combined with IPN return variables.

howto/configure-paypal.txt · Last modified: 2021/06/03 14:40 (external edit)