File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 1
1
build
2
2
vendor
3
3
.DS_Store
4
- composer.lock
4
+ composer.lock
5
+ .idea
Original file line number Diff line number Diff line change @@ -188,8 +188,8 @@ public function isTransactionVerificationValid()
188
188
189
189
/**
190
190
* Get Payment details if the transaction was verified successfully
191
- * @throws Unicodeveloper\Paystack\Exceptions\PaymentVerificationFailedException
192
191
* @return json
192
+ * @throws PaymentVerificationFailedException
193
193
*/
194
194
public function getPaymentData ()
195
195
{
@@ -278,4 +278,36 @@ private function getData()
278
278
return $ this ->getResponse ()['data ' ];
279
279
}
280
280
281
- }
281
+ //Edits by Funsho http://devfunsho.com | @iamfusnho - 22/05/2016
282
+
283
+ /**
284
+ * Create a plan
285
+ * @return array
286
+ */
287
+ public function createPlan (){
288
+
289
+ $ data = [
290
+
291
+ "name " => request ()->name ,
292
+ "description " => request ()->desc ,
293
+ "amount " => intval (request ()->amount ),
294
+ "interval " => request ()->interval ,
295
+ "send_invoices " => request ()->send_invoices ,
296
+ "send_sms " => request ()->send_sms ,
297
+ "currency " => request ()->currency ,
298
+ ];
299
+
300
+ $ this ->setRequestOptions ();
301
+
302
+ $ this ->response = $ this ->client ->post ($ this ->baseUrl .'/plan ' , [
303
+ 'body ' => json_encode ($ data )
304
+ ]);
305
+
306
+ return $ this ->response ->getResponse ();
307
+
308
+ }
309
+
310
+ }
311
+
312
+
313
+
You can’t perform that action at this time.
0 commit comments