File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function getPaymentData(): array
7676 {
7777 $ this ->validateTransaction ();
7878
79- return $ this ->getData ();
79+ return $ this ->getResponse ();
8080 }
8181
8282 /**
@@ -99,22 +99,31 @@ private function validateTransaction(): void
9999 */
100100 public function verifyTransaction (string $ reference ): array
101101 {
102- return $ this ->httpClient ()->get (url: "transaction/verify/ {$ reference }" );
102+ return $ this ->makeRequest (
103+ method: 'GET ' ,
104+ requestUrl: "transaction/verify/ {$ reference }" ,
105+ );
103106 }
104107
105108 /**
106109 * Hit Paystack's Api to get a transaction
107110 */
108111 public function getTransaction (string $ reference ): array
109112 {
110- return $ this ->httpClient ()->get (url: "transaction/ {$ reference }" );
113+ return $ this ->makeRequest (
114+ method: 'GET ' ,
115+ requestUrl: "transaction/ {$ reference }" ,
116+ );
111117 }
112118
113119 /**
114120 * Hit Paystack's Api to get all transaction
115121 */
116122 public function getAllTransactions (): array
117123 {
118- return $ this ->httpClient ()->get (url: 'transaction ' );
124+ return $ this ->makeRequest (
125+ method: 'GET ' ,
126+ requestUrl: "transactions " ,
127+ );
119128 }
120129}
You can’t perform that action at this time.
0 commit comments