Shop - Payment gateway support


Setup for PayPal, CIB, OTP

You’ll need to update the configuration file in a local version with the shop settings to enable the proper payment gateway. Each has different setting, each should have some level of documentation (hopefully enough) in the config file itself.

How the transaction plugin works?

Every type of transaction has:

  • a model – This stores the data associated with the transaction (trid, amount, etc.). The model is also associated with an order (if the shop plugin is enabled). The model is also responsible for handling the various steps of the processes for each transaction. (See TransactionCib, TransactionOtp, etc.)
  • a controller – This controller handles payment notification callbacks, return urls, etc. Any user-facing processes are handled here. (See transaction/otp.ctl.php, etc.). Payment notification callbacks must ensure that the source of the request is legitimate.
  • support in Order model – Each transaction is defined as $payment_methods_post or $payment_methods_immediate. Post pay methods do not require immediate payment upon ordering, immediate pay methods do. When a product is ordered in the shop and an immediate payment method is selected, the user is rerouted to the payment method’s controller’s send() method. At this point it is the controller’s and the transaction model’s job to go through the payment gateway’s process and eventually return the user to the proper thank you page. The thank you page display whether or not the payment was successful. For reference, see send() and receive() methods in otp.ctl.php.
  • configuration options – Each transaction mode should be configurable for future implementations. All variables (such as ids, client key paths, thank you page urls, etc.) should be store in transaction.conf.ini.

The full process

Here is the ordering and payment process in a diagram.

CIB Bank – Server installation

CIB requires the sakide client to be installed. You should receive the latest version from the bank, but we have archives for internal use on our Basecamp.

To install, follow these steps:

  1. Unzip the files.
  2. Use the precompiled Linux 64bit sakide bin and place it in a folder that is outside of www
  3. Place the proper lib files in this same folder
  4. Create a symlink to the lib file from the /lib folder
  5. Add execution chmod to the sakide bin file and run it
  6. The required parameters are in the documentation and are also set up in the plugin already.

    OTP Bank – Server installation

    No server installation required.

Outlast Web & Mobile Development (c) 2019 | Privacy Policy |