kingflamez / laravelrave-implementation

An integration of laravelrave package
3 stars 8 forks source link

verifyTransaction RETURNING null #4

Open kennyendowed opened 4 years ago

kennyendowed commented 4 years ago

public function ravecallback() { // This verifies the transaction and takes the parameter of the transaction reference $data = Rave::verifyTransaction(request()->txref); dd($data);

$chargeResponsecode = $data->data->chargecode; $chargeAmount = $data->data->amount; $chargeCurrency = $data->data->currency; // // // $amount = 4500; // $currency ="NGN";

// if (($chargeResponsecode == "00" || $chargeResponsecode == "0") && ($chargeAmount == $amount) && ($chargeCurrency == $currency)) { // transaction was successful... // please check other things like whether you already gave value for this ref // if the email matches the customer who owns the product etc //Give Value and return to Success page if (($chargeResponsecode == "00" || $chargeResponsecode == "0")) { return redirect('/success');

} else { //Dont Give Value and return to Failure page

   return redirect('/failed');

}

// dd($data->data); }

returning NULL

victorcool commented 4 years ago

Please Can someone help with this issue, i am facing the same issue here, Return NULL

imranlashari commented 4 years ago

Please Can someone help with this issue, i am facing the same issue here, Return NULL

yes i have sort out this issue follow the steps: goto resources goto views open buy.blade.php

place <input type="hidden" name="currency" value="USD" /> after <input type="hidden" name="amount" value="500" />

imranlashari commented 4 years ago

public function ravecallback() { // This verifies the transaction and takes the parameter of the transaction reference $data = Rave::verifyTransaction(request()->txref); dd($data);

$chargeResponsecode = $data->data->chargecode; $chargeAmount = $data->data->amount; $chargeCurrency = $data->data->currency; // // // $amount = 4500; // $currency ="NGN";

// if (($chargeResponsecode == "00" || $chargeResponsecode == "0") && ($chargeAmount == $amount) && ($chargeCurrency == $currency)) { // transaction was successful... // please check other things like whether you already gave value for this ref // if the email matches the customer who owns the product etc //Give Value and return to Success page if (($chargeResponsecode == "00" || $chargeResponsecode == "0")) { return redirect('/success');

} else { //Dont Give Value and return to Failure page

   return redirect('/failed');

}

// dd($data->data); }

returning NULL yes i have sort out this issue follow the steps: goto resources goto views open buy.blade.php

place <input type="hidden" name="currency" value="USD" /> after <input type="hidden" name="amount" value="500" />