Improvements for forte

This commit is contained in:
David Bomba 2024-08-14 20:19:37 +10:00
parent 8c62026db3
commit e1dc5d1176
2 changed files with 5 additions and 2 deletions

View File

@ -232,7 +232,7 @@ class BaseDriver extends AbstractPaymentDriver
*
* @param ClientGatewayToken $cgt The client gateway token object
* @param PaymentHash $payment_hash The Payment hash containing the payment meta data
* @return ?Payment The payment response
* @return ?Payment|bool The payment response
*/
public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash)
{

View File

@ -248,6 +248,9 @@ class FortePaymentDriver extends BaseDriver
private function getClient(?string $email)
{
if(!$email)
return false;
return ClientContact::query()
->where('company_id', $this->company_gateway->company_id)
->where('email', $email)
@ -257,7 +260,7 @@ class FortePaymentDriver extends BaseDriver
public function tokenBilling(\App\Models\ClientGatewayToken $cgt, \App\Models\PaymentHash $payment_hash)
{
$amount_with_fee = $payment_hash->data->total->amount_with_fee;
$amount_with_fee = $payment_hash->data->amount_with_fee;
$fee_total = $payment_hash->fee_total;
$data =