Glossary Item Box

Squirrelcart v6.1.0

Adding a Custom Payment Method

We have had several people ask whether they could add a custom payment method, such as "call to order" and similar to the "check or money order" method. This topic explains how. This is considered an advanced topic, and should only be attempted by someone with good knowledge of HTML and an understanding of PHP.

Please do not confuse payment methods with payment gateways. A payment method should not be used to simulate payment gateway functionality.

 

  1. Open the Payment Methods table

  2. Click

  3. Enter a name that best explains the method in the Name field
  4. Set the Type field to Other
  5. Enter a file name in the Module Name field. You can choose any valid PHP filename you like. For example, if you want people to phone in order, choose something like phone.php. We recommend you make the filename lowercase, and with no spaces. It also must end in .php
  6. Check the Enabled field
  7. Click Save Changes
  8. Make a new file in the squirrelcart/payment_gateways folder and name it the same as what you entered in step 5 above.
  9. Paste the contents of squirrelcart/payment_gateways/check.php into your new file.
    This new file will be included when the person checks out and chooses the new payment method you are setting up. You may want to change the wording in the file according to the method you are creating.
  10. If you want the cart to complete the order when the customer get's to this page, then add this to the very top of your new file:
    <?php $SC['complete_order'] = 1; ?>

 

 


© 2001-2017 Lighthouse Development. All Rights Reserved.