Updating subscriptions

This commit is contained in:
David Bomba 2021-07-15 14:35:22 +10:00
parent 97885557bd
commit 7c83f9d04e
3 changed files with 173 additions and 13491 deletions

View File

@ -97,8 +97,6 @@ class SubscriptionService
$response = $this->triggerWebhook($context);
// nlog($response);
$this->handleRedirect('/client/recurring_invoices/'.$recurring_invoice->hashed_id);
}
@ -523,7 +521,8 @@ class SubscriptionService
*/
private function handlePlanChange($payment_hash)
{
nlog("handle plan change");
nlog("handle plan change");
$old_recurring_invoice = RecurringInvoice::find($payment_hash->data->billing_context->recurring_invoice);
$recurring_invoice = $this->createNewRecurringInvoice($old_recurring_invoice);
@ -916,10 +915,8 @@ nlog("handle plan change");
public function planPaid($invoice)
{
nlog("this is a plan that has been paid");
$recurring_invoice_hashed_id = $invoice->recurring_invoice()->exists() ? $invoice->recurring_invoice->hashed_id : null;
$context = [
'context' => 'plan_paid',
'subscription' => $this->subscription->hashed_id,
@ -928,12 +925,8 @@ nlog("handle plan change");
'contact' => $invoice->client->primary_contact()->first()->hashed_id,
];
nlog($context);
$response = $this->triggerWebhook($context);
nlog($response);
return true;
}
}

13643
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,9 +11,9 @@
},
"devDependencies": {
"@babel/compat-data": "7.9.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"laravel-mix-purgecss": "^5.0.0",
"vue-template-compiler": "^2.6.12"
"vue-template-compiler": "^2.6.14"
},
"dependencies": {
"@tailwindcss/ui": "^0.7",
@ -25,8 +25,8 @@
"laravel-mix": "^5.0.9",
"linkify-urls": "^3.1.1",
"lodash": "^4.17.21",
"resolve-url-loader": "^3.1.3",
"sass": "^1.32.13",
"resolve-url-loader": "^3.1.4",
"sass": "^1.35.2",
"sass-loader": "^8.0.0",
"tailwindcss": "^1.9.6"
}