noorisys/paypal-subscription

There is no license information available for the latest version (1.0.0) of this package.

Laravel Paypal Subscription using srmklive/paypal

1.0.0 2023-03-25 05:34 UTC

This package is auto-updated.

Last update: 2024-04-25 08:14:17 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require noorisys/paypal-subscription

Add the service provider to config/app.php in the providers array.

Noorisys\PaypalSubscription\Providers\PaypalSubscriptionServiceProvider::class,

Configuration

Laravel PayPal requires connection configuration. To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Noorisys\PaypalSubscription\Providers\PaypalSubscriptionServiceProvider" --force

This will create a config/paypal.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

You are free to change the configuration file as needed, but the default expected values are below:

    'mode'    => env('PAYPAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
    'sandbox' => [
        'client_id'         => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
        'client_secret'     => env('PAYPAL_SANDBOX_CLIENT_SECRET', ''),
        'app_id'            => 'APP-80W284485P519543T',
    ],
    'live' => [
        'client_id'         => env('PAYPAL_LIVE_CLIENT_ID', ''),
        'client_secret'     => env('PAYPAL_LIVE_CLIENT_SECRET', ''),
        'app_id'            => env('PAYPAL_LIVE_APP_ID', ''),
    ],

Run APIs on Postman

import postman collection via link and run APIs

https://api.postman.com/collections/18476697-7e81ea1c-7d1e-4965-9953-b25b40ebaf25?access_key=PMAT-01GVFRSKHNB4F5RY2CWY4G75YG