2nd readiness check
This commit is contained in:
parent
29735c60bb
commit
d38ce4fe15
|
@ -28,9 +28,12 @@ class Hookmanager
|
||||||
"subscription_payment_succeeded",
|
"subscription_payment_succeeded",
|
||||||
"subscription_payment_failed",
|
"subscription_payment_failed",
|
||||||
"subscription_payment_refunded",
|
"subscription_payment_refunded",
|
||||||
"payment_refunded",
|
"payment_refunded"
|
||||||
|
|
||||||
]
|
];
|
||||||
|
|
||||||
|
|
||||||
|
private $AppBaseURL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,9 +93,9 @@ class Hookmanager
|
||||||
$sVal = $value;
|
$sVal = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Redirect request to approriate route.
|
// Uses the response and redirect objects and the intent from the current request to redirect it
|
||||||
// Use translator helper method to translate developer name to readable route name for redirect
|
return $this->redirectAlert($request, $response, $sVal);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,6 +105,57 @@ class Hookmanager
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The response and request method is passed by the redirecting method
|
||||||
|
public function redirectAlert(Request $Request, Response $response, $intent)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch ($intent)
|
||||||
|
{
|
||||||
|
|
||||||
|
case "subscription_created":
|
||||||
|
|
||||||
|
return $response->withRedirect(, 307)
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "subscription_updated":
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "subscription_cancelled":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "subscription_payment_successful":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "subscription_payment_failed":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "subscription_payment_refunded":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "payment_refunded":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
|
||||||
|
// default code here
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function EventSubscriptionCreated(Request $request, Response $response, $args)
|
public function EventSubscriptionCreated(Request $request, Response $response, $args)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue