Commit 5ce198c8 authored by Mark Harding's avatar Mark Harding

(fix): if recurring then it can't be once. Log in sentry so we can debug - closes #1188

parent 68f2470f
No related merge requests found
Pipeline #99798493 waiting for delayed job with stages
in 8 minutes and 14 seconds
......@@ -61,6 +61,12 @@ class wire implements Interfaces\Api
$recurring = isset($_POST['recurring']) ? $_POST['recurring'] : false;
$recurringInterval = $_POST['recurring_interval'] ?? 'once';
if ($recurring && $recurringInterval === 'once') {
$recurringInterval = 'monthly';
// Client side bug we need to track down, so lets log in Sentry
\Sentry\captureMessage("Recurring Subscription was created with 'once' interval");
}
if (!$amount) {
return Factory::response(['status' => 'error', 'message' => 'you must send an amount']);
}
......
Please register or to comment