HOW TO add my own (additional) payment module?

Talk and help info about common issues

Moderators: ne_moj, zewa

administrator
Site Admin
Site Admin
Posts: 5938
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO add my own (additional) payment module?

Postby administrator » Jan 18th, '11, 11:01

To add additional payment module you have to perform following steps
(you must have a basic knowledge of PHP and HTML):

1. Learn the interface of your payment processing company and it's implementation with PHP.

2. Add appropriate changes in include/classes/PaymentIPN.class.php file for your payment processing type.
(currently it includes PayPal and 2CO)

3. Add new record into "modules_settings" table (take in account that table structure may differs in your script)

Code: Select all

INSERT INTO `modules_settings` SET
`module_name` = 'booking',
`settings_key` = 'YOUR_PAYMENT_METHOD',
`settings_value` = 'no',
`settings_description_const` = '',
`key_display_type` = 'yes/no',
`key_is_required` = '0',
`key_display_source` = '';


4. Add appropriate changes to Reservations.class.php (Payments.class.php or another - according to the script you work), according to code, used for PayPal and 2CO. Everywhere when you see PayPal related code - add the code related to your new payment provider.

5. Add appropriate changes to page/booking_payments.php file (the name may differs in your script), according to code, used for PayPal and 2CO

6. If you want to add/store some specific parameters of your payment company on Modules -> Booking settings page,
simply add them to database table called "modules_settings" and they will appear automatically.

------------------------------
We also integrate payment modules for additional fees:
http://www.apphp.com/index.php?page=services#Template

xenios
Junior
Junior
Posts: 23
Joined: Feb 6th, '11, 07:30

Re: HOW TO add my own (additional) payment module?

Postby xenios » Feb 6th, '11, 12:45

administrator wrote:3. Add new record into "modules_settings" table
INSERT INTO `modules_settings` SET
`module_name` = 'booking',
`settings_key` = 'YOUR_PAYMENT_METHOD',
`settings_value` = 'no',
`settings_description` = 'Specifies whether to allow YOUR payment method',
`key_display_type` = 'yes/no',
`key_is_required` = '0';



There is an error in the above code. Table name in not 'modules_settings` but 'aphs_modules_settings'.

honjian5231
Junior
Junior
Posts: 17
Joined: Mar 23rd, '11, 11:25

Re: HOW TO add my own (additional) payment module?

Postby honjian5231 » May 4th, '11, 08:43

how to i manage the return variable after the transaction,
and can u show me more detail about getting a customer variable?
apology for the easy question=)

administrator
Site Admin
Site Admin
Posts: 5938
Joined: Jan 7th, '09, 23:18
Contact:

Re: HOW TO add my own (additional) payment module?

Postby administrator » May 4th, '11, 09:40

Look in the page/handlers/handler_booking_notify_paypal.php


Return to “ApPHP Hotel Site {HOW TO}”