Skip to main content

The PayPal payment plugin lets guests pay for their booking with PayPal: with their PayPal balance, or with a card through PayPal. The guest is sent to PayPal to approve the payment, and when they come back to your site the payment is taken and the booking is confirmed. Each property has its own PayPal settings, so each property can be paid into its own PayPal account.

PREREQUISITES:

  • Solidres 4.3.0 or later. This article describes Solidres 4.6.0 and later, where the settings are on the property's Pricing & payments tab.
  • The PayPal plugin, version 2.0 or later, available to Solidres subscribers. It is a download of its own, not part of the Solidres package.
  • A PayPal Business account. A personal account cannot create the API credentials the plugin needs.
  • A server that may open HTTPS connections to PayPal (api-m.paypal.com, and api-m.sandbox.paypal.com for testing).

On this page:

  1. Get your PayPal API credentials
  2. Install and enable the plugin
  3. Set up PayPal for a property
  4. Test with the sandbox, then go live
  5. What happens when a guest pays
  6. Troubleshooting
  7. Upgrading from PayPal 1.x

PAYPAL 1.x: Earlier versions of this plugin used PayPal Payments Standard: you entered your PayPal e-mail address and turned on Auto Return in your PayPal account. Version 2.0 uses PayPal's REST API instead, so it needs a Client ID and a Secret, and nothing has to be set up in your PayPal account's website preferences. If you are upgrading, see Upgrading from PayPal 1.x.

1. Get your PayPal API credentials

The plugin talks to PayPal through an app in your PayPal developer account. An app has a Client ID and a Secret, and you need one pair for live payments and one for testing in the sandbox.

  1. Go to the PayPal Developer Dashboard and log in with your PayPal Business account.
  2. Open Apps & Credentials. The switch at the top chooses between Sandbox and Live: each has its own apps and credentials.
  3. With Sandbox chosen, use the default app PayPal created for you, or click Create App, give it a name (your site's, for example), choose the type Merchant and create it.
  4. Copy the app's Client ID and its Secret (PayPal may call it Secret key 1). These are your sandbox credentials.
  5. Switch to Live and do the same to get your live credentials.

Keep the Secret private: with the Client ID, it lets anyone take and refund payments on your PayPal account. If it leaks, generate a new one for the app in the dashboard and enter it in Solidres.

2. Install and enable the plugin

  1. Download the PayPal plugin from your account on solidres.com.
  2. In your Joomla administrator, go to System → Install → Extensions and upload the zip file.
  3. Go to System → Manage → Plugins, search for PayPal and make sure Solidres - PayPal plugin (REST Orders API) is enabled.

From PayPal 2.0.1, later versions are listed in System → Update and install from there, using the Download ID in Solidres Options.

3. Set up PayPal for a property

Open the property in Solidres → Properties, go to its Pricing & payments tab and open the PayPal panel under Payment methods, beside the other payment methods installed on your site. The settings are:

SettingWhat it does
Enable PayPalOffers PayPal to guests booking this property.
DefaultMakes PayPal the payment method that is already chosen on the booking form. One method that is turned on must be the default.
Front end messageThe text guests see when they click the question mark beside PayPal in the list of payment methods. The default tells them they will be sent to PayPal and should come back to your site afterwards.
Client ID and Secret IDYour live app's Client ID and Secret.
Enable sandboxSends payments to PayPal's sandbox, where no real money moves. It is on by default: turn it off when you go live.
Sandbox Client ID and Secret IDYour sandbox app's Client ID and Secret. Shown while Enable sandbox is on.
Cancel redirect pageThe menu item a guest is sent to when they cancel the payment at PayPal. Leave it empty to send them to your home page.
Cancel messageThe message shown to a guest who cancelled at PayPal. Leave it empty for the default: Your reservation number … at … has been successfully cancelled. You can use placeholders such as [CODE], [CUSTOMER_FIRSTNAME] and [RESERVATION_ASSET_NAME].

Only the credentials of the mode the property is in are used: the sandbox pair while Enable sandbox is on, the live pair while it is off. Save the property, and drag the payment method panels if you want PayPal shown higher or lower in the list guests see.

NOTE: From PayPal 2.0.3 with Solidres 4.8.0, PayPal is not offered to guests, on the booking form or through the public booking API, until the property has a Client ID and a Secret for the mode it is in. Before that, guests could choose PayPal on a property that was not set up, and then could not pay.

With the Hub: partners set up PayPal for their own properties, with their own PayPal accounts, from the property form on the front end, as long as Front end payment method manage is on in Solidres Options, tab Hub (it is by default). Turn it off if only you should manage payment methods, from the administrator.

Tours: the Experience add-on has its own PayPal payment plugin, set up on each experience's Payments tab with the PayPal e-mail address of your business account. See How to configure Experience. This article is about bookings of rooms.

4. Test with the sandbox, then go live

  1. With Enable sandbox on and the sandbox credentials entered, make a booking on your site and choose PayPal.
  2. At PayPal's sandbox, log in with a sandbox personal account. PayPal creates one for you: find its e-mail address and password in the Developer Dashboard under Testing Tools → Sandbox Accounts.
  3. Approve the payment. You are sent back to your site and see the booking's confirmation, and the booking is confirmed in Solidres → Reservations, with the payment in its payment history.
  4. Try a cancellation too: start another booking and, at PayPal, cancel and return to your site. The booking is cancelled and you see the cancel message.
  5. When everything works, enter the live Client ID and Secret ID, turn Enable sandbox off and save the property.

5. What happens when a guest pays

  1. The guest completes the booking form with PayPal chosen. The booking is saved with the Default reservation status from Solidres Options, and the guest is sent to PayPal.
  2. The amount sent to PayPal is what the guest pays online: the deposit when the property takes one, otherwise the booking total, with the payment method's surcharge or discount. The tourist tax collected at the property is not included.
  3. The guest approves the payment at PayPal and is sent back to your site. Only then does Solidres ask PayPal to take the money, and check that PayPal's answer is for this booking and for the right amount.
  4. When the payment is complete, the booking gets the Confirmation reservation status and the Confirmation payment status from Solidres Options (tab Reservation), the payment is added to its payment history, and the guest lands on the booking's final page, from which the booking e-mails are sent.

Other outcomes:

  • Cancelled at PayPal: the booking gets the Cancellation reservation status and Cancellation payment status, and the guest goes to the Cancel redirect page with the Cancel message.
  • Payment held for review by PayPal: the booking gets the Pending reservation status and Pending payment status, and no payment is recorded, because the money is not in your account yet. PayPal does not tell your site when it is released: check your PayPal account, and when the money arrives, confirm the booking and add the payment to its payment history yourself.
  • Less than the amount due: the payment is recorded, and the booking stays pending until you settle it with the guest.
  • The guest never returns to your site (they closed the browser after approving): PayPal does not take the money, because it is taken only on the guest's return. The booking stays with its default status and unpaid.

With the Invoice add-on, a guest paying one of their invoices online can pay it with PayPal too. Refunds are made in your PayPal account: the plugin does not send them.

6. Troubleshooting

The plugin writes what it sends to and receives from PayPal to solidres_paypal.php in your site's log folder (administrator/logs by default), with PayPal's reason when something is refused. Look there first.

  • PayPal is not offered on the booking form: check that the plugin is enabled, that Enable PayPal is on for the property, and, from PayPal 2.0.3 with Solidres 4.8.0, that the property has a Client ID and Secret for the mode it is in.
  • The booking is saved but the guest is not sent to PayPal: PayPal could not be reached, refused the credentials, or refused the payment, for example in a currency it does not take. Check that the credentials match the mode (sandbox credentials work only with Enable sandbox on, live ones only with it off) and that the property's currency is one of the currencies PayPal supports. From PayPal 2.0.3, the booking is kept unpaid and the guest is told at once that the payment is not complete; earlier versions showed an error page.
  • PayPal refuses an amount with too many decimals: a booking total can come out with more than two decimals, from an extra priced at 7.065 for example. From PayPal 2.0.3, the amount is rounded to the cent, or to the whole unit in the Hungarian forint, Japanese yen and New Taiwan dollar, which PayPal takes only that way. Update the plugin.
  • The log has lines with access_token: PayPal 2.0.1 and earlier wrote the access token PayPal gives your site to the log. Update to 2.0.2 or later, then delete solidres_paypal.php or remove those lines from it.

7. Upgrading from PayPal 1.x

PayPal 1.x sent guests to PayPal Payments Standard with your PayPal e-mail address and was told about payments through PayPal's IPN messages. PayPal 2.0 replaces that with the REST API, so after installing it over 1.x:

  1. Get a Client ID and Secret for live and sandbox, as in step 1.
  2. Enter them in every property that takes PayPal, and check Enable sandbox: turn it off for properties that take live payments.
  3. Optionally, turn off Auto Return and the IPN notification URL you set up in your PayPal account for 1.x: version 2.0 does not use them. Leave them on if another application on the same PayPal account needs them.

The PayPal Pro plugin, which took card details on your site, is no longer offered.

All the things you need to make your work easier. Did you like Solidres?