💳
Nafezly Payments
  • ✔️OverView
  • ⚓Instalation
  • 🏗️Configrations
  • Payment Gateways
    • PayPal
    • Paymob
    • Kashier
    • Fawry
    • Hyperpay
    • Thawani
    • Tap
    • Opay
    • Paytabs
    • Paymob E-wallets
    • Kashier E-wallets
  • 💳Test Cards
  • ➕Contribute
Powered by GitBook
On this page
  1. Payment Gateways

Kashier

how to use Kashier payment gateway from nafezly payments

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Nafezly\Payments\Classes\KashierPayment;

class PaymentController extends Controller
{

    public function payWithKashier(Request $request){
        $payment = new KashierPayment();
        $response = $payment
        ->setAmount($amount)
        //if you want to enable installments plans please pass bank_installments to source
        ->setSource('card,bank_installments')
        ->pay();  
        
        
        dd($response);
        //output
        //[
        //    'payment_id'=>"", // refrence code that should stored in your orders table
        //    'redirect_url'=>"", // redirect url available for some payment gateways
        //    'html'=>"" // rendered html available for some payment gateways
        //]
        
    }
    
    public function verifyWithKashier(Request $request){
        $payment = new KashierPayment();
        $response = $payment->verify($request);
        
        
        dd($response);
        //output
        //[
        //    'success'=>true,//or false
        //    'payment_id'=>"PID",
        //    'message'=>"Done Successfully",//message for client
        //    'process_data'=>""//payment response
        //]
    }
    
}
PreviousPaymobNextFawry

Last updated 2 years ago