Download the PHP package pleets/laravel-paypal without Composer

On this page you can find all versions of the php package pleets/laravel-paypal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-paypal

Build Status Code Quality Bugs Code Coverage

Laravel integrator for PayPal solutions. Actually this library supports the following solutions:

1. Requirements

You need to make sure your server meets the following requirements.

2. Installation

Use following command to install this library:

Add the service provider to your providers[] array in config/app.php file like:

Finally, publish the vendor files.

3. Usage

3.1 Live and Sandbox environments

Set up first API credentials for sandbox with the following env vars.

For live environment set up the following.

You can choose your current environment with the following.

The only valid values for this are sandbox and live.

3.2 Checkout

Activate paypal checkout with the following env var.

Add the PayPal SDK to your blade templates as follows

:bulb: You don't have to be worried about when to include this SDK. The component checks for PAYPAL_CHECKOUT_ACTIVATED and then include the JavaScript SDK in case the value were true.

Then you can add the Smart Payment Button like this

:warning: Finally, after the code of this button add the javascript code to handle it. This JS file is not intended to be used for production. It is just an example about how to handle the PayPal button.

The checkout.js file contains values related to the purchase amount and purchase behaviour. For other values you can check the official documentation.

3.3 Subscriptions

Activate paypal subscriptions with the following en var.

You can interact with subscriptions Api through this PayPal SDK. Add the service provider to your providers[] array in config/app.php file like:

Add the PayPal SDK to your blade templates as follows

:bulb: You don't have to be worried about when to include this SDK. The component checks for PAYPAL_SUBSCRIPTION_ACTIVATED and then include the JavaScript SDK in case the value were true.

Then you can add the Smart Payment Button like this

:warning: Finally, after the code of this button add the javascript code to handle it. This JS file is not intended to be used for production. It is just an example about how to handle the PayPal button.

The subscriptions.js file contains values related to creating subscriptions and purchase behaviour. For other values you can check the official documentation.

4. Mocking

If you want to mock the PayPal Service for testing purposes, you need to overwrite the paypal testing configuration. You must create a testing.php file inside config/paypal folder and set up a specific handler like this.

Feel free to use your own paypal mock, or you can use this PayPal Api Mock.

Finally, you should set up the following in your testing environment.


All versions of laravel-paypal with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
laravel/framework Version ^7.0|^8.0
payment-gateways/paypal-sdk Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pleets/laravel-paypal contains the following files

Loading the files please wait ....