Skip to content

Commit 298bd37

Browse files
author
Okubanjo Oluwafunsho
committed
Support for creating pages
You can now create pages that can be shared among users using its slug
1 parent 240d177 commit 298bd37

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/Paystack.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,33 @@ public function fetchSubscription($subscription_id){
476476

477477
$this->setRequestOptions();
478478

479-
return $this->setGetResponse('/subscription/'.$subscription_id)->getResponse();
479+
return $this->setGetResponse('/subscription/'.$subscription_id, [])->getResponse();
480480

481481
}
482482

483+
/**
484+
* Create pages you can share with users using the returned slug
485+
* @return array
486+
*/
487+
public function createPage(){
488+
489+
$data = [
490+
491+
"name" => request()->name,
492+
"description" => request()->description,
493+
"amount" => request()->amount
494+
];
495+
496+
$this->setRequestOptions();
497+
498+
return $this->setGetResponse('/page', $data)->getResponse();
499+
500+
}
501+
502+
public function fetchPages(){
503+
504+
}
505+
483506
}
484507

485508

0 commit comments

Comments
 (0)