Skip to content

Commit 6ae32d4

Browse files
author
Okubanjo Oluwafunsho
committed
Support for fetching a customer details
You can fetch a customer’s details using its id or code
1 parent ff2e537 commit 6ae32d4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Paystack.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,18 @@ public function fetchAllCustomers(){
374374

375375
}
376376

377-
377+
/**
378+
* Fetch a customer based on id or code
379+
* @param $customer_id
380+
* @return array
381+
*/
382+
public function fetchCustomer($customer_id){
383+
384+
$this->setRequestOptions();
385+
386+
return $this->setGetResponse('/customer/'. $customer_id, [])->getResponse();
387+
388+
}
378389

379390
}
380391

0 commit comments

Comments
 (0)