I'm wondering when a customer would receive a email with his invoice?
At: admin -> settings -> payment I can configure an email that will be sent when a customer places an order.
When I test this and select COD as payment, no email is send.
Any ideas on how to fix this?

Also,
I wonder if it's possible to create more payment options like: cod and moneytransfer. So that a customer can choose between those 2. Now I only have the option cod and paypal.

Btw, I'm using 4.6

Ferid

Comments

ferid’s picture

Does anybody know something about this problem??

christolear’s picture

I would appreciate a little more information on how this problem has been handled. I have implemented ecommerce for a computer show that I am chairing. When people use the cod method of payment, they do not get an invoice or any notice that they have completed a transaction. Nothing is sent to me as an administrator. This is quite frustrating.

Right now I am working around the problem by creating some php code to execute the store_send_invoice_email($txnid) function by hand and this must be done everytime someone makes a purchase. Not very accurate. I have tried to follow the code and I get as far as the payment_submit module where it calls a "payment_method"_paymentapi function. However, there is no cod_paymentapi function. I have rearranged this so the invoice comes first to no avail. In following the $edit['txnid'] = store_transaction_save($edit); code, I find repeated references to the non-existent cod_paymentapi. I have no idea where this falls down but this little issue will determine whether or not my group continues to use and recommend drupal for activities such as ours.

I originally posted this problem under COD transaction notices and that post is now over a month old.

Thank you.

mgcarley’s picture

I got around this (this may have been the design of the COD module in the first place) was in administer > settings > cod and set "Mark Transaction as Paid" to "Yes". Obviously this would cause problems in the event that you used this as basis for a shippable item, but in my case, I am visiting the client after an order anyway.

In this case, I would be wanting to check my Bank Account before shipping (I put my bank account details in the "Invoice Email" under administer > settings > payment - it's quite common practice to put these details on your invoices here in Finland anyway), in the event that the money is being wired.

Otherwise, I would assume that you are hand-delivering the item anyway and would be collecting payment at that time, anyway. It's kind of ambiguous, really, but either way you would not be handing over the item until you have the money in your hand anyway.

Hope this helps someone!

Mathew Carley
http://www.fingeekit.com

dublin drupaller’s picture

Hiya,

I was tweaking the cod.module to be a "bill me later" module (billmelater.module) - so people can order something, get an invoice and pay by cheque/bank draft or money transfer - and I was able to automatically send an invoice when someone submits an order.

It's a fairly simple tweak of the COD.MODULE to do the same...i.e.

(line numbers 95 - 107 in the 4.7 version of code.module $Id: cod.module,v 1.8 2006/05/12 07:26:23)

CHANGE THIS:

    $edit['txnid'] = $txn->txnid;
    // Update the transaction
    $txnid = store_transaction_save($edit);
    if ($txn->txnid) {
      // Send an email notification
      store_send_invoice_email($txn->txnid);
    };
  }
  else {
    drupal_set_message(t('Your purchase has been received.'));
  }
  return strtr(variable_get('cod_url', 'product'), array('%txnid' => $txn->txnid));
}

TO THIS:

    $edit['txnid'] = $txn->txnid;
    // Update the transaction
    $txnid = store_transaction_save($edit);
  }
  else {
    drupal_set_message(t('Your purchase has been received.'));
  }
  if ($txn->txnid) {
      // Send an email notification
      store_send_invoice_email($txn->txnid);
    };
  return strtr(variable_get('cod_url', 'product'), array('%txnid' => $txn->txnid));
}

there's only a few lines changed, but I find it easier when people paste a chunk instead of one or two lines. I think the same will work with the Drupal 4.6 version of cod.module.

What the code change does, is automatically submit an invoice by email once an order is placed....as is the norm with invoice->cheque/bankdraft/money transfer transactions.

hope that helps

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate