I'm setting up Ubercart on a Drupal 7 - upgraded site that originally used Commerce to allow customers to register for premium access to the website (granted via their user role).
On the D7 site I used the contrib module "Commerce Custom Offline Payments", which allowed me to add payment methods for deferred payment and manual update by admin. For example, the customer could choose 'Standing Order' or 'Direct Bank payment', and then be directed to relevant pages with further instructions. This didn't allow automated online payment (eg like PayPal) but that was fine. On receipt of the relevant detail from the customer (by email) the admin could then manually adjust their role.
In trying to replicate this behaviour with UC, I'm looking for advice on how to add two extra custom payment methods (Standing Order and Direct Bank payment). I'm sure this must be possible but I don't quite know where to start. I can deal with the notification via Rules, as long as I can identify what payment method was selected at checkout.
Thank you for your advice, if you have any! If there is a better way of doing what I'm trying to achieve (in BackdropCMS), I'd love to hear it.
Martin
Comments
Please see my comment on Zulip regarding the "Other" payment method provided by uc_payment_pack.module, which may provide a solution for this.
Otherwise, implementing a new offline payment method programmatically is pretty straightforward in Ubercart. Take a look at uc_payment_pack.module. You need to create a custom module that implements `hook_uc_payment_method()` to define the new method, and then create a callback function (see for example the callback for check payments, `uc_payment_method_check()`). This callback checks which checkout steps you are in, and displays specific outputs. In the case of check payments, the module also creates a table to keep track of checks that have been received, but this last part may not be necessary if you are doing the tracking manually.
To add custom payment methods like "Standing Order" and "Direct Bank payment" in Ubercart, follow these steps:
1.Add Payment Methods: Go to admin/store/settings/payment and create new payment methods by selecting "Custom" and entering the relevant details.
2.Modify Checkout Process: Use hook_uc_payment_method_info() in a custom module to integrate and configure these methods.
3.Handle Notifications: Set up a rule in the Rules module to trigger actions based on the selected payment method at checkout.
For BackdropCMS, check the BackdropCMS documentation and Rules module for similar solutions. For detailed help, explore the Ubercart module documentation or consult the BackdropCMS community.