Closed kmesiab closed 13 years ago
Fixed by adjusting function chargify function to:
public function create_subscription($data) {
$data = array(
'subscription' => $data
);
$result = $this->query('/subscriptions.json', 'post', $data);
if($result->code == 201) {
$subscription = json_decode($result->response);
if(count($subscription) == 1) {
return $subscription->subscription;
}
return false;
}
$this->error($result->response, $result->code);
return json_decode($result->response);
}
I'm going to guess that the error wasn't displaying because you had debug mode off, please make sure this is set to true:
$debug = true;
I am creating a customer and subscription at the same time. I'm assuming a general failure of some sort as the results of the function call ->create_subscription returns NULL.
How can I get information on why this charge failed?