Miscellaneous additions (previously untracked)
This commit is contained in:
parent
437d81838a
commit
a8f089e3b2
|
@ -10,18 +10,66 @@ $App = new \Slim\App([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: rearrange endpoints
|
||||||
|
|
||||||
|
// detects the intent on the app's post load
|
||||||
$App->post
|
$App->post
|
||||||
(
|
(
|
||||||
"/api/paddle/{authkey}/detectIntent",
|
"/api/woocommerce/{authkey}/detectIntent",
|
||||||
Hookmanager::class, ':detectPayloadIntent'
|
Hookmanager::class, ':detectPayloadIntent'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// hooks into the EventSubscriptionCreated class, so that stuff can be done with it.
|
||||||
|
// the request is redirected by the detectIntent endpoint.
|
||||||
$App->post
|
$App->post
|
||||||
(
|
(
|
||||||
"/api/paddle/{authkey}/hook",
|
"/api/woocommerce/{authkey}/hooks/SubscriptionCreatead",
|
||||||
Hookmanager::class, ':EventSubscriptionCreatead'
|
Hookmanager::class, ':EventSubscriptionCreatead'
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
|
||||||
|
"/api/woocommerce/{authkey}/hooks/SubscriptionCancelled",
|
||||||
|
Hookmanager::class, ':EventSubscriptionCancelled'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
"/api/woocommerce/{authkey}/hooks/SubscriptionUpdated",
|
||||||
|
Hookmanager::class, ':EventSubscriptionUpdated'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
"/api/woocommerce/{authkey}/hooks/SubscriptionPaymentSuccess",
|
||||||
|
Hookmanager::class, ':EventSubscriptionPaymentSuccess'
|
||||||
|
);
|
||||||
|
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
"/api/woocommerce/{authkey}/hooks/SubscriptionPaymentFailed",
|
||||||
|
Hookmanager::class, ':EventSubscriptionPaymentFailed'
|
||||||
|
);
|
||||||
|
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
|
||||||
|
"/api/woocommerce/{authkey}/hooks/SubscriptionPaymentRefunded",
|
||||||
|
Hookmanager::class, ':EventSubscriptionPaymentRefunded'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
// TODO: deploy route
|
||||||
|
$App->post
|
||||||
|
(
|
||||||
|
|
||||||
|
"/api/wocommerce/{authkey}/requests/customer/{customerID}",
|
||||||
|
Hookmanager::class, ':GetCustomerByID'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
$App->run();
|
$App->run();
|
|
@ -62,7 +62,7 @@ class Emailer
|
||||||
\ByJG\Mail\MailerFactory::registerMailer('smtp', \ByJG\Mail\Wrapper\PHPMailerWrapper::class);
|
\ByJG\Mail\MailerFactory::registerMailer('smtp', \ByJG\Mail\Wrapper\PHPMailerWrapper::class);
|
||||||
$this->Mailer = \ByJG\Mail\MailerFactory::create($connStr);
|
$this->Mailer = \ByJG\Mail\MailerFactory::create($connStr);
|
||||||
|
|
||||||
$this->Mailer->setFrom("noreply@spacejewel.ga", "Spacejewel Billing System");
|
$this->Mailer->setFrom("noreply@spacejewel-hosting.com", "Spacejewel Billing System");
|
||||||
$this->Mailer->addTo($this->CustomerEmail);
|
$this->Mailer->addTo($this->CustomerEmail);
|
||||||
|
|
||||||
}
|
}
|
|
@ -54,7 +54,7 @@ class Package extends Application
|
||||||
"mail",
|
"mail",
|
||||||
"ssl",
|
"ssl",
|
||||||
"spam",
|
"spam",
|
||||||
"virus"
|
"virus",
|
||||||
"limits-from-plan"
|
"limits-from-plan"
|
||||||
|
|
||||||
];
|
];
|
Loading…
Reference in New Issue