Skip to content

Commit

Permalink
Solved payerEmail error that occurs when a payment fails or is denied.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adedayo Adeniyi authored and Adedayo Adeniyi committed Aug 16, 2019
1 parent 362432e commit ff9e085
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions paystackpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public function onPaymentReceived($gateway, &$dealt, &$payed,
$validate_response = "VERIFIED";
$response = json_encode($transData);
$payerEmail = $transData->customer->email;
if(!$payerEmail){ $payerEmail = $theuser->email;}
}
else if (property_exists($transData, 'error') || ($transData->status === 'failed'))
{
Expand Down

0 comments on commit ff9e085

Please sign in to comment.