Roy E Huaman

Roy E Huaman


How to Integrate PayPal Payment Gateway in Laravel 6?

In this tutorial, I would like to guide you step by step paypal integration with Laravel 6 Application. We can easily integrate paypal payment gateway in laravel 6. I written Laravel 6 paypal integration so your user can easily payment vie paypal account and credit card information.

We are using integrate paypal api using srmklive laravel paypal package. Srmklive/laravel-paypal package provide methods of paypal code api. We will use express checkout method in Laravel 6 Application.

As we know Paypal payment gateway is a more popular gateway in web development. Almost client or people prefer to use paypal payment gateway for money transfer in his website. Paypal is a user friendly gateway to transfer word wide.

In this tutorial, we will use srmklive package for laravel paypal integrate in laravel 6. you just need to follow few steps to getting done payment integration in php laravel 6.

Step 1: Install Laravel 6

We are going from scratch so, If you haven’t installed laravel in your system then you can run bellow command and get fresh Laravel project.

composer create-project --prefer-dist laravel/laravel blog

Step 2: Install Composer Package

Now we require to install srmklive/paypal package for paypal integration, that way we can use it’s method. So Open your terminal and run bellow command.

composer require srmklive/paypal

Now open config/app.php file and add service provider and aliase.


'providers' => [





We can also custom changes on srmklive/paypal package, so if you also want to changes then you can fire bellow command and get config file in config/paypal.php.

php artisan vendor:publish --provider "Srmklive\PayPal\Providers\PayPalServiceProvider"

You can view paypal.php file like as bellow:




 * PayPal Setting & API Credentials

 * Created by Raza Mehdi .



return [

    'mode'    => env('PAYPAL_MODE', 'sandbox')

    'sandbox' => [

        'username'    => env('PAYPAL_SANDBOX_API_USERNAME', ''),

        'password'    => env('PAYPAL_SANDBOX_API_PASSWORD', ''),

        'secret'      => env('PAYPAL_SANDBOX_API_SECRET', ''),

        'certificate' => env('PAYPAL_SANDBOX_API_CERTIFICATE', ''),

        'app_id'      => 'APP-80W284485P519543T',


    'live' => [

        'username'    => env('PAYPAL_LIVE_API_USERNAME', ''),

        'password'    => env('PAYPAL_LIVE_API_PASSWORD', ''),

        'secret'      => env('PAYPAL_LIVE_API_SECRET', ''),

        'certificate' => env('PAYPAL_LIVE_API_CERTIFICATE', ''),

        'app_id'      => '',


    'payment_action' => 'Sale',

    'currency'       => env('PAYPAL_CURRENCY', 'USD'),

    'billing_type'   => 'MerchantInitiatedBilling',

    'notify_url'     => '',

    'locale'         => '',

    'validate_ssl'   => false,


Step 3: Add Routes

Here, we need to add resource route for paypal payment gateway. so open your “routes/web.php” file and add following route.


Route::get('payment', 'PayPalController@payment')->name('payment');

Route::get('cancel', 'PayPalController@cancel')->name('payment.cancel');

Route::get('payment/success', 'PayPalController@success')->name('payment.success');

Step 4: Create Controller

In this step, now we should create new controller as PayPalController. So run bellow command and create new controller. bellow controller for create with some methods.

php artisan make:controller PayPalController

After bellow command you will find new file in this path “app/Http/Controllers/PayPalController.php”.




namespace App\Http\Controllers;


use Illuminate\Http\Request;

use Srmklive\PayPal\Services\ExpressCheckout;


class PayPalController extends Controller



     * Responds with a welcome message with instructions


     * @return \Illuminate\Http\Response


    public function payment()


        $data = [];

        $data['items'] = [


                'name' => '',

                'price' => 100,

                'desc'  => 'Description for',

                'qty' => 1




        $data['invoice_id'] = 1;

        $data['invoice_description'] = "Order #{$data['invoice_id']} Invoice";

        $data['return_url'] = route('payment.success');

        $data['cancel_url'] = route('payment.cancel');

        $data['total'] = 100;


        $provider = new ExpressCheckout;


        $response = $provider->setExpressCheckout($data);


        $response = $provider->setExpressCheckout($data, true);


        return redirect($response['paypal_link']);




     * Responds with a welcome message with instructions


     * @return \Illuminate\Http\Response


    public function cancel()


        dd('Your payment is canceled. You can create cancel page here.');




     * Responds with a welcome message with instructions


     * @return \Illuminate\Http\Response


    public function success(Request $request)


        $response = $provider->getExpressCheckoutDetails($request->token);


        if (in_array(strtoupper($response['ACK']), ['SUCCESS', 'SUCCESSWITHWARNING'])) {

            dd('Your payment was successfully. You can create success page here.');



        dd('Something is wrong.');



Step 5: Create View File

In this step, we need to update welcome.blade.php file. in this file we will put one button for paypal payment gateway. so let’s put bellow code:


<!doctype html>



        <meta charset="utf-8">

        <meta name="viewport" content="width=device-width, initial-scale=1">


        <title>Laravel 6 PayPal Integration Tutorial -</title>


        <!-- Fonts -->

        <link href=",600" rel="stylesheet">

        <link rel="stylesheet" href="" integrity="sha256-YLGeXaapI0/5IgZopewRJcFXomhRMlYYjugPLSyNjTY=" crossorigin="anonymous" />


        <!-- Styles -->


            html, body {

                background-color: #fff;

                color: #636b6f;

                font-family: 'Nunito', sans-serif;

                font-weight: 200;

                height: 100vh;

                margin: 0;


            .content {

                margin-top: 100px;

                text-align: center;





        <div class="flex-center position-ref full-height">


            <div class="content">

                <h1>Laravel 6 PayPal Integration Tutorial -</h1>


                <table border="0" cellpadding="10" cellspacing="0" align="center"><tr><td align="center"></td></tr><tr><td align="center"><a href="" title="How PayPal Works" onclick="'','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); return false;"><img src="" border="0" alt="PayPal Logo"></a></td></tr></table>


                <a href="{{ route('payment') }}" class="btn btn-success">Pay $100 from Paypal</a>






Step 6: Add Configuration

In this step, we will set configuration value like paypal username, secret and certificate key in .env file.








You can see bellow screen shot for getting above details:

Now we are ready to run our this application example with laravel 6 so run bellow command for quick run:

php artisan serve

Now you can open bellow URL on your browser:


You can download code from git: Download Code from Github

I hope it can help you…

#laravel #php #web-development

What is GEEK

Buddha Community

How to Integrate PayPal Payment Gateway in Laravel 6?

Stripe Payment Gateway Integration Example In Laravel 8

In this post i will share you stripe payment gateway integration example in laravel 8, stripe payment gateway is integrated in many website for payment collection from client, In this time many e-commerce website and other shopping websites are use stripe payment gateway.

So, here we will learn stripe payment gateway integration in laravel 8.

Read More : Stripe Payment Gateway Integration Example In Laravel 8

Read Also : How To Integrate Paypal Payment Gateway In Laravel

#stripe payment gateway integration example in laravel 8 #laravel 8 stripe payment gateway integration example #stripe payment gateway integration in laravel 8 #stripe payment gateway #laravel8 #payment gateway

Seamus  Quitzon

Seamus Quitzon


How to integrate paytm payment gateway in laravel example

As we know that paytm is fastest growing plateform to provies payment services. So here i will let you know how to integrate paytm payment gateway in laravel with an example.

Paytm provides digital payment methods and boomed after digital india movement. Most of the marchant accepts paytm payment.

Here, in this example we will use a laravel package (“anandsiddharth/laravel-paytm-wallet”) to integrate paytm payment gateway in our laravel application.

So let’s start paytm integration process in our laravel application from scratch. You will need to just follow the steps as mentioned in this tutorial.

Step 1: Install laravel

In this first step, we will create a fresh laravel application using the following command. If you don’t want to install new application you can also integrate into your existing application. You can jump directly to the next step otherwise just open your terminal and run the command as given below.

composer create-project --prefer-dist laravel/laravel test-app

Step 2: Install Package

For installing the desired package, you will just need to run the following composer command in your terminal. It will automatically dowload all the files required for this package in your application.

composer require anandsiddharth/laravel-paytm-wallet

After running the above command, you will need to setup some configurations for this package. So open config/app.php file and add provider and alias as given as under.


'providers' => [




'aliases' => [


  'PaytmWallet' => Anand\LaravelPaytmWallet\Facades\PaytmWallet::class,


Now we will need to add some other configuration like marchant id and key. So open config/services.php file and add the line of code as mentaioned below.



return [

    'paytm-wallet' => [
        'env' => 'local', // values : (local | production)
        'merchant_id' => env('YOUR_MERCHANT_ID'),
        'merchant_key' => env('YOUR_MERCHANT_KEY'),
        'merchant_website' => env('YOUR_WEBSITE'),
        'channel' => env('YOUR_CHANNEL'),
        'industry_type' => env('YOUR_INDUSTRY_TYPE'),


Now add these secret key date in the application’s environment file like below.





#laravel #integrate paytm in laravel #integration paytm gateway laravel example #laravel paytm integration #paytm gateway in laravel #paytm payment gateway

Einar  Hintz

Einar Hintz


Razorpay Payment Gateway Integration in ASP.NET MVC

In this article, you will learn Razorpay Payment Gateway Integration in ASP.NET MVC web application or an eCommerce website using C#. With Razorpay, you have access to all payment modes, including credit and debit cards, UPI, and popular mobile wallets.

To check the Razorpay Payment Gateway demo, please click here:

How to integrate Razorpay Payment Gateway in ASP.NET

The Razorpay Payment Gateway enables you to accept payments via debit card, credit card, net banking (supports 3D Secure), UPI, or through any of our supported wallets. Refer to the Payment Methods section for a list of payment methods we support.

Find the below steps to integrate Razorpay in your website:- #how to #mvc #razorpay payment gateway #razorpay payment gateway demo #razorpay payment gateway documentation #razorpay payment gateway integration #razorpay payment gateway integration in c#

How To Integrate Paypal Payment Gateway In Laravel

In this tutorial i will teach you most important topic how to integrate paypal payment gateway in laravel, payment integatetion is very useful and important features in e-commerce website.

Here, i am talking about paypal integartion in laravel, in this tutorial i will explain you how to integrate paypal payment gateway in latest version of laravel,

PayPal is an American company operating a worldwide online payments system that supports online money transfers and serves as an electronic alternative to traditional paper methods like checks and money orders.So, follow below steps and get proper output.

How To Integrate Paypal Payment Gateway In Laravel

#laravel #paypal #payment gateway #integrate

Linda John

Linda John


Crypto Payment Gateway Services assist in the smooth execution of Transactions

As business firms keep expanding their operations, the need for a payment gateway increases with every passing day. It offers a mechanism for accepting transactions made in any Cryptocurrency by the users.

A Crypto payment gateway is highly secure, prevents the chances of chargeback frauds, can be used for processing peer to peer transactions, and is completely immutable.

Using cryptocurrencies is beneficial as it can be exchanged 24x7, eliminates the role of third parties, low transaction fees when compared to debit and credit cards, and eliminates the chance of fraud.

The Typical Features of a Cryptocurrency Payment Gateway are

  • Support for the major cryptos, fiat currencies, and stablecoins.
  • Safety measures like two-factor authentication, jail login, cross-site request forgery protection, and server-side request forgery protection.
  • 24x7 technical support is provided in numerous languages.
  • Has plugins integrated with e-commerce platforms.
  • Free deposits and withdrawals of cryptos by the users.
  • Access to transaction history for the users that helps in real-time monitoring of their payments.
  • An integrated referral program or an affiliate program where rewards can be earned by existing users for referring new users to the crypto payment gateway.
  • Cold storage facilities where funds of the users can be backed up securely. An offline vault is also available for safeguarding digital assets.
  • Compliance with the regulations of GAP600 that guarantees the instant execution of transactions made in Cryptocurrencies.
  • Integration with POS (Point of Sale) systems where payments can be made in cryptos for purchasing goods and services.

The Process that users have to implement while using a Cryptocurrency Payment Gateway

  • The user has to send information about the amount of cryptos that he is willing to pay.
  • The status of the transaction will display on the screen and he has to press the confirm option.
  • The payment will be confirmed after a few seconds.
  • The user can see the details of the transaction executed like the amount, time, and the party to whom the payment has been made.
  • His account balance will be updated immediately.
    In this digital era, obtaining Crypto payment gateway services is highly necessary and inevitable.

#crypto payment gateway services #crypto payment gateway #payment gateway services #cryptocurrency payment gateway