So, are you looking forward to to add Custom Payment Gateway with WP Travel Pro?

Well, WP Travel is a complete booking package for trips and tours with its payment gateways. It is the best WordPress tour operator plugin for travel

and tour agencies to create and publish outstanding tour and travel packages, build detailed itineraries, take tour bookings, receive and process online payments, and much more.

So, if you need another Payment Gateway and want to create a custom Payment Gateway then our developers have prepared the prototype of a custom payment gateway for easy integration of 3rd-party payment into WP Travel core.

Also, please find below the resources that include documentation and prototype code for custom payment development. You or your developer should be able to modify it and develop the payment addon.

Let us know if you’ve any questions regarding the integration.

You might be interested: How to Integrate Different Payment Systems to Travel Websites?

WP Travel Payment Prototype Docs

β€œInstruction to follow before making payment addon for WP Travel.”

If you are using GitLab to clone the addon prototype.

Step 1: Clone repo GitHub repo:ws-plugins/wp-travel-payment-prototype.git in your plugin folder.

Step 2: Go to plugin folder cd wp-travel-payment-prototype

Step 3: Checkout to the dev branch.

Note: All the core files of the payment prototype is inside /inc/modules/payment-prefix-core folder.

Steps to Add Custom Payment Gateway with WP Travel Pro

Step 1: You can rename the addon folder ‘wp-travel-payment-prototype

You can rename the addon folder ‘wp-travel-payment-prototype’ to your requirement. For e.g β€˜wp-travel-paypal-express’ and also rename folder (addonfolder/inc/modules/) β€˜payment-prefix-core’ to your requirement.

For e.g β€˜paypal-express-core’.

Step 2: Rename β€˜wp-travel-payment-prefix.php’

Go inside the payment addon folder and rename β€˜wp-travel-payment-prefix.php’ to your requirement. For e.g β€˜wp-travel-paypal-express.php’.

Step 3: Add your payment folder to the code editor

Now if you are using VS Code or Sublime, add your payment folder to the code editor and search inside the folder using a match case so that the exact word will be found.

For example, if you search for β€˜wp travel’ without using a match case then it will also search for β€˜WP Travel’. But using a match case, it only searches for β€˜wp travel’.

Step 4: Search for the following words one by one

Now search for the following words one by one and rename them with your requirements.

For e.g β€˜payment prefix’ to β€˜paypal express’ or β€˜payment_prefix’ to β€˜paypal_express’.

If you found any other payment prefix word inside the folder then change that accordingly.

Payment Prefix
payment_prefix
payment-prefix
PAYMENT_PREFIX
Payment_Prefix
PaymentPrefix
PaymentPrefixData

Step 5: Open terminal inside addon folder to type β€˜npm install’

After replacing all of the above words, open the terminal inside the addon folder and type β€˜npm install’ or β€˜yarn install’. Wait!! It will take some time.

Step 6: Go inside the core folder and type β€˜yarn install

After completion, go inside the core folder and type β€˜yarn install’.. This will install necessary dependencies on the folder and you are ready to develop.

Step 7: Work on /corefolder/app/admin/settings/index.js file

If you are working on the admin settings payment tab, work on /corefolder/app/admin/settings/index.js file. But before working on this use β€˜yarn start’ to develop.

After saving the file this will automatically compile your js file. After developing you can minify the js using β€˜yarn build’.

Step 8: You can start developing your custom payment addon

Now, you can start developing your custom payment addon for WP Travel. Main hooks and addon listing are given inside the core main php file. 

Step 9: Add a field default value for enabling/disabling addon

For saving the fields on the backend, a settings file has been added (corefolder/inc/admin/settings.php). Here you can add a field default value like the one added in the file for enabling/disabling the addon.

Conclusion

Check the WP Travel documentation to learn more about configurations, modules, payments, and shortcodes.

Your feedback helps us improve. Feel free to share your thoughts!

Need assistance? Contact our support team, join our Facebook community, and subscribe to our YouTube Channel for video tutorials.

You can also find us on Facebook, Instagram, LinkedIn, TikTok, and X. Thank you for choosing WP Travel.

If you are a WP Travel Free user thinking about upgrading to Pro, simply click on the banner below.

Get WP Travel Pro