URGENT - one time invoice errors

megryanrobinson's Avatar

megryanrobinson

26 Nov, 2012 08:41 PM

Hey guys. I am trying to run a one time invoice using the PHP wrappers. When I call the API I am getting error code 412 with the following aux code:

charges[chargeCode][invoicePeriod]:notInArray

I am not passing invoicePeriod because it is not documented here: https://cheddargetter.com/developers#one-time-invoice, so I don't even know what the API is expecting. Do I need to pass "outstanding" or "current" with a call for a new one time invoice? Below is my PHP code making the call:

$CGinvoice["charges"]["chargeCode"] = "BF2233";
//$CGinvoice["charges"]["chargeCode"]["invoicePeriod"] = "outstanding"; - I tried adding this line, but it didn't help.
$CGinvoice["charges"]["quantity"] = "1";
$CGinvoice["charges"]["eachAmount"] = "99";
$CGinvoice["charges"]["description"] = "15 months - $99";
$invoice = $client->newOneTimeInvoice($uid, null, $CGinvoice);

Any help you can give will be much appreciated.

  1. 1 Posted by megryanrobinson on 26 Nov, 2012 08:58 PM

    megryanrobinson's Avatar

    I'm an idiot. Read the docs again.

    $CGinvoice["charges"]["chargeCode"] = "BF2233";
    

    Should be:

    $CGinvoice["charges"]["chargeCode"] = "BF2233";
    

    Sorry to bother you:)

  2. Marc Guyer closed this discussion on 26 Nov, 2012 09:55 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM