Add null check for subscription fee on paymongo connector #799
This commit is contained in:
parent
5a2f57492d
commit
b3548fcc50
1 changed files with 3 additions and 3 deletions
|
|
@ -99,7 +99,7 @@ class PayMongoConnector
|
|||
$body = [
|
||||
'data' => [
|
||||
'attributes' => [
|
||||
'amount' => (int)$plan_data['amount'],
|
||||
'amount' => $plan_data['amount'],
|
||||
'currency' => 'PHP',
|
||||
'description' => $plan_data['description'],
|
||||
'interval' => $plan_data['interval'],
|
||||
|
|
@ -118,7 +118,7 @@ class PayMongoConnector
|
|||
$body = [
|
||||
'data' => [
|
||||
'attributes' => [
|
||||
'amount' => (int)$plan_data['amount'],
|
||||
'amount' => $plan_data['amount'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -154,7 +154,7 @@ class PayMongoConnector
|
|||
// create new plan
|
||||
$result = $this->createPlan([
|
||||
'name' => "RESQ Subscription",
|
||||
'amount' => bcmul($bsize->getSubRecurringFee(), 100),
|
||||
'amount' => (int)bcmul($bsize->getSubRecurringFee() ?? 0, 100),
|
||||
'description' => "Motolite Battery Subscription Plan",
|
||||
'interval' => 'monthly',
|
||||
'interval_count' => 1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue