@@ -127,7 +127,7 @@ public function makePaymentRequest()
127
127
*
128
128
* ]
129
129
*/
130
- 'metadata ' => request ()->metadata
130
+ 'metadata ' => request ()->metadata
131
131
];
132
132
133
133
// Remove the fields which were not sent (value would be null)
@@ -319,7 +319,6 @@ public function createPlan()
319
319
$ this ->setRequestOptions ();
320
320
321
321
$ this ->setHttpResponse ("/plan " , 'POST ' , $ data );
322
-
323
322
}
324
323
325
324
/**
@@ -434,6 +433,44 @@ public function createSubscription()
434
433
$ this ->setHttpResponse ('/subscription ' , 'POST ' , $ data );
435
434
}
436
435
436
+ /**
437
+ * Get all the subscriptions made on Paystack.
438
+ *
439
+ * @return array
440
+ */
441
+ public function getAllSubscriptions ()
442
+ {
443
+ $ this ->setRequestOptions ();
444
+
445
+ return $ this ->setHttpResponse ("/subscription " , 'GET ' , [])->getData ();
446
+ }
447
+
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
+
461
+ /**
462
+ * Get plan subscriptions
463
+ *
464
+ * @param integer $plan_id
465
+ * @return array
466
+ */
467
+ public function getPlanSubscriptions ($ plan_id )
468
+ {
469
+ $ this ->setRequestOptions ();
470
+
471
+ return $ this ->setHttpResponse ('/subscription?plan= ' . $ plan_id , 'GET ' , [])->getData ();
472
+ }
473
+
437
474
/**
438
475
* Enable a subscription using the subscription code and token
439
476
* @return array
0 commit comments