Shipu / php-aamarpay-payment

PHP Aamarpay Payment Gateway
34 stars 18 forks source link

valid method issue #6

Closed PritomAhsan closed 3 years ago

PritomAhsan commented 3 years ago

So testing the laravel one. after paying with bkash and verify it always redirects to else so its not finding the $valid. Here is the full controller code. can you please check what is the issue here.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Shipu\Aamarpay\Facades\Aamarpay;

class PayController extends Controller
{
    public function paymentSuccessOrFailed(Request $request)
    {

        if($request->get('pay_status') == 'Failed') {
            return redirect()->back();
        }

        $amount = $request->amount;

        $valid  = Aamarpay::valid($request, $amount);
//        return $valid;

        if($valid) {
            return 'success';
        } else {
            return 'Failed';
        }

        return redirect()->back();
    }
}
Shipu commented 3 years ago

no issue found