Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56e8fc6

Browse files
committed
add method to get subscriptions of a customer
1 parent 8251ef3 commit 56e8fc6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Paystack.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,19 @@ public function getAllSubscriptions()
445445
return $this->setHttpResponse("/subscription", 'GET', [])->getData();
446446
}
447447

448+
/**
449+
* Get customer subscriptions
450+
*
451+
* @param integer $customer_id
452+
* @return array
453+
*/
454+
public function getCustomerSubscriptions($customer_id)
455+
{
456+
$this->setRequestOptions();
457+
458+
return $this->setHttpResponse('/subscription?customer=' . $customer_id, 'GET', [])->getData();
459+
}
460+
448461
/**
449462
* Enable a subscription using the subscription code and token
450463
* @return array

0 commit comments

Comments
 (0)