Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

paying by bill?


Reply


6 Posts   1509 Views

Avatar
wilhelm oder wil er nicht

Community Member, 16 Posts

23 February 2009 at 2:00am

hi there, I'm thinking about using the e-commerce module but the payment options are kinda debar me. the favourite payment method of my client would be just paying by bill (it's national anyway, Switzerland) and I was wondering if that's possible or at least if it's possible to add this as a second payment method?
thanks for any help!

Avatar
wilhelm oder wil er nicht

Community Member, 16 Posts

4 March 2009 at 5:49am

come on, nobody does know?

Avatar
Fuzz10

Community Member, 787 Posts

4 March 2009 at 8:49am

Hi Wilhelm,

I have never used the commerce module , but I know for sure that it is possible to build your own payment options. (you are lucky, paying by bill sounds like a very easy one... ;-) ....

Avatar
wilhelm oder wil er nicht

Community Member, 16 Posts

6 March 2009 at 10:59pm

yes I know. well I'm not really good at PHP and not really familiar with e-shops - yet - but well, everybody needs to start somewhere, right. I thought probably somebody would have already created a payment option like that and could give me some advices?

Avatar
Digital-Punk.co.uk

Community Member, 51 Posts

8 July 2009 at 2:49am

Hi there

as default u can use cheque option - this is like bank transfer (bill payment).

Best regards,
Mind

Avatar
Phill

Community Member, 77 Posts

25 September 2009 at 9:54pm

This might help i've done similar
##### ecommerce/code/Ivoicepayment #####

<?php

/**
* @package ecommerce
*/

/**
* Payment object representing a invoice payment
*/
class InvoicePayment extends Payment {
   /**
    * Process the Cheque payment method
    */
   function processPayment($data, $form) {
      if(!$this->PaymentMethod)
         $this->PaymentMethod = "InvoicePayment";
         
      if(!$this->Status)
         $this->Status = "Pending";
         
      if(!$this->Message)
         $this->Message = "<p class=\"warningMessage\">Payment is outstanding.</p>";
      
      $result['Success'] = "Success";
      $result['PaymentID'] = $this->write();
      return $result;
   }
   
   function getPaymentFormFields() {
      return new FieldSet(
         // retrieve cheque content from the ChequeContent() method on this class
         new LiteralField("Chequeblurb", '<div id="Cheque" class="typography">' . $this->ChequeContent() . '</div>'),
         new HiddenField("Invoice", "Invoice", 0)
      );
   }
   function getPaymentFormRequirements() {
      return null;
   }

   /**
    * Returns the Cheque content from the CheckoutPage
    */
   function ChequeContent() {
      return "Payment is outstanding.";
   }
   
   /**
    * Function used for in template to check if payment is cheque.
    */
   function IsInvoicePayment(){
      return true;
   }
   
}

?>

// Then to add this new payment type add the following to you config file
Payment::set_supported_methods(array(
   //'DPSPayment' => 'Credit Card (DPS)',
   //'ChequePayment' => 'Cheque',
   'InvoicePayment' => 'Invoice Payment'
));

Hope thats some help