[freeside-users] getting a refund back to a customer

Boyiazis, Michael MBoyiazis at corp.untd.com
Tue Oct 6 15:59:02 PDT 2015


Hi,
We have a very ancient version of freeside (pre 1.7.4) if/when that matters...

We have a number of customers that we're going to be refunding a prorated amount after we cancel their package.

I have done this:

     $thispkg->cancel( quiet => 1,
                        no_credit => 0,
                        time => $enddate,
                        reason => $reasonnum );
      # quiet => no cancellation email;
      # no_credit = 0 => give credit for unused time (per Bill this is a revenue friendly way to do it)
      # reason => use a reasonnum from public.reason table

If the customer owes us money (i.e. there is an open/unpaid invoice), canceling and giving a credit for unused time works.  I see a credit for unused time which would soften the blow of what the customer owes us.  This makes sense since they haven't abused us for the full amount of their service, only a portion of it.  The unused time gets credited and the final amount we'd write off is the remaining balance.

If the user is in good standing and the invoice/package is all paid up, no credit goes back to the customer account when I use the above.  The package is canceled and that is that.  No credit even though they didn't get to use their full term of service.

**
After encountering the above, I tried simply doing a cust_credit and a cust_refund - feeding the credit number to cust_refund so the credit and refund would 'team up' and balance out the account.  However, the refund doesn't get sent to the gateway (cybersource) to put back on the customer card.  I totally understand why this happens as I am not telling the code to talk to our payment processor (cybersource) after collecting the amount I want to refund.

I can do this via the freeside GUI, but it seems the refund that occurs is when I refund a specific pay(num) event.  And, I haven't been able to track the code to the point of finding which package calls to make to give money back.

Long story short, I would simply like to put a credit on an account and refund that credit amount back to a customer.

Thanks,
 
Michael Boyiazis
mboyiazis at corp.untd.com



More information about the freeside-users mailing list