We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0904881 commit 39a9658Copy full SHA for 39a9658
src/Helpers/Payments.php
@@ -218,4 +218,27 @@ public function momoFranc(array $data)
218
219
return $payment;
220
}
221
+
222
+ /**
223
+ * Charge via Card
224
+ * @param $data
225
+ * @return object
226
+ */
227
+ public function card(array $data)
228
+ {
229
+ $payment = Http::withToken($this->secretKey)->post(
230
+ $this->baseUrl . '/charges?type=card',
231
+ $data
232
+ )->json();
233
234
+ if ($payment['status'] === 'success') {
235
+ return [
236
+ 'status' => $payment['status'],
237
+ 'message' => $payment['message'],
238
+ 'data' => $payment['meta']['authorization'],
239
+ ];
240
+ }
241
242
+ return $payment;
243
244
0 commit comments