mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 23:04:36 -04:00
update todos
This commit is contained in:
parent
46a525f04d
commit
83c636aa55
@ -51,13 +51,8 @@ class SubscriptionService
|
|||||||
throw new \Exception("Illegal entrypoint into method, payload must contain billing context");
|
throw new \Exception("Illegal entrypoint into method, payload must contain billing context");
|
||||||
}
|
}
|
||||||
|
|
||||||
// At this point we have some state carried from the billing page
|
// if we have a recurring product - then generate a recurring invoice
|
||||||
// to this, available as $payment_hash->data->billing_context. Make something awesome ⭐
|
// if trial is enabled, generate the recurring invoice to fire when the trial ends.
|
||||||
|
|
||||||
// create client subscription record
|
|
||||||
//
|
|
||||||
// create recurring invoice if is_recurring
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -166,30 +161,31 @@ class SubscriptionService
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
//@todo - need refactor
|
||||||
public function triggerWebhook()
|
public function triggerWebhook()
|
||||||
{
|
{
|
||||||
//hit the webhook to after a successful onboarding
|
//hit the webhook to after a successful onboarding
|
||||||
|
|
||||||
$body = [
|
// $body = [
|
||||||
'subscription' => $this->subscription,
|
// 'subscription' => $this->subscription,
|
||||||
'client_subscription' => $this->client_subscription,
|
// 'client_subscription' => $this->client_subscription,
|
||||||
'client' => $this->client_subscription->client->toArray(),
|
// 'client' => $this->client_subscription->client->toArray(),
|
||||||
];
|
// ];
|
||||||
|
|
||||||
|
|
||||||
$client = new \GuzzleHttp\Client(['headers' => $this->subscription->webhook_configuration->post_purchase_headers]);
|
// $client = new \GuzzleHttp\Client(['headers' => $this->subscription->webhook_configuration->post_purchase_headers]);
|
||||||
|
|
||||||
$response = $client->{$this->subscription->webhook_configuration->post_purchase_rest_method}($this->subscription->post_purchase_url,[
|
// $response = $client->{$this->subscription->webhook_configuration->post_purchase_rest_method}($this->subscription->post_purchase_url,[
|
||||||
RequestOptions::JSON => ['body' => $body]
|
// RequestOptions::JSON => ['body' => $body]
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
SystemLogger::dispatch(
|
// SystemLogger::dispatch(
|
||||||
$body,
|
// $body,
|
||||||
SystemLog::CATEGORY_WEBHOOK,
|
// SystemLog::CATEGORY_WEBHOOK,
|
||||||
SystemLog::EVENT_WEBHOOK_RESPONSE,
|
// SystemLog::EVENT_WEBHOOK_RESPONSE,
|
||||||
SystemLog::TYPE_WEBHOOK_RESPONSE,
|
// SystemLog::TYPE_WEBHOOK_RESPONSE,
|
||||||
$this->client_subscription->client,
|
// $this->client_subscription->client,
|
||||||
);
|
// );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user