Skip to content

Commit 219b691

Browse files
add charge validation support
1 parent 39a9658 commit 219b691

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Rave.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,22 @@ public function getTransactionIDFromCallback()
8282
return $transactionID;
8383
}
8484

85+
/**
86+
* Reaches out to Flutterwave to validate a charge
87+
* @param $data
88+
* @return object
89+
*/
90+
public function validateCharge(array $data)
91+
{
92+
93+
$payment = Http::withToken($this->secretKey)->post(
94+
$this->baseUrl . '/validate-charge',
95+
$data
96+
)->json();
97+
98+
return $payment;
99+
}
100+
85101
/**
86102
* Reaches out to Flutterwave to verify a transaction
87103
* @param $id

0 commit comments

Comments
 (0)