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 = [
|
$body = [
|
||||||
'data' => [
|
'data' => [
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'amount' => (int)$plan_data['amount'],
|
'amount' => $plan_data['amount'],
|
||||||
'currency' => 'PHP',
|
'currency' => 'PHP',
|
||||||
'description' => $plan_data['description'],
|
'description' => $plan_data['description'],
|
||||||
'interval' => $plan_data['interval'],
|
'interval' => $plan_data['interval'],
|
||||||
|
|
@ -118,7 +118,7 @@ class PayMongoConnector
|
||||||
$body = [
|
$body = [
|
||||||
'data' => [
|
'data' => [
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'amount' => (int)$plan_data['amount'],
|
'amount' => $plan_data['amount'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
@ -154,7 +154,7 @@ class PayMongoConnector
|
||||||
// create new plan
|
// create new plan
|
||||||
$result = $this->createPlan([
|
$result = $this->createPlan([
|
||||||
'name' => "RESQ Subscription",
|
'name' => "RESQ Subscription",
|
||||||
'amount' => bcmul($bsize->getSubRecurringFee(), 100),
|
'amount' => (int)bcmul($bsize->getSubRecurringFee() ?? 0, 100),
|
||||||
'description' => "Motolite Battery Subscription Plan",
|
'description' => "Motolite Battery Subscription Plan",
|
||||||
'interval' => 'monthly',
|
'interval' => 'monthly',
|
||||||
'interval_count' => 1,
|
'interval_count' => 1,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue