Skip to content

Commit 3d25f02

Browse files
author
Okubanjo Oluwafunsho
committed
Add support to fetch a plan
Now, you can fetch the details of any plan based on its id or code
1 parent fc0eef2 commit 3d25f02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Paystack.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,21 @@ public function createPlan(){
307307

308308
}
309309

310+
/**
311+
* Fetch any plan based on its plan id or code
312+
* @param $plan_code
313+
* @return mixed
314+
*/
315+
public function fetchPlan($plan_code){
316+
317+
$this->setRequestOptions();
318+
319+
$this->response = $this->client->post($this->baseUrl .'/plan/' . $plan_code, []);
320+
321+
return $this->response->getResponse();
322+
323+
}
324+
310325
}
311326

312327

0 commit comments

Comments
 (0)