PHPackages                             shadomax/wepay-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. shadomax/wepay-laravel

ActiveLibrary[API Development](/categories/api)

shadomax/wepay-laravel
======================

WePay API wrapper for Laravel 5

09PHP

Since Jun 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Shadomax/wepay-laravel)[ Packagist](https://packagist.org/packages/shadomax/wepay-laravel)[ RSS](/packages/shadomax-wepay-laravel/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Wepay Wrapper For Laravel 5
---------------------------

[](#wepay-wrapper-for-laravel-5)

This wrapper allows you to use the WePay API within Laravel using the standard Facade structure. If you would like more information on wepay, please checkout

Installation
------------

[](#installation)

First you need edit your `composer.json` file with the following:

```
"require-dev": {
    "shadomax/wepay-laravel": "dev-master",
    "wepay/PHP-SDK": "*"
}
```

And then run `composer install`.

Once that has finished, you need to edit 2 sections of your `app/config/app.php` configuration file. The first section is the providers array, like so:

```
'providers' => array(
    // ...

    'Shadomax\WepayLaravel\WepayLaravelServiceProvider'
)
```

The 2nd section is within the aliases array, like this:

```
'aliases' => array(
    // ...

    'WepayWrapper'    => 'Shadomax\WepayLaravel\Facades\WepayLaravel'
)
```

You just finished the installation of the Wrapper! Whoo! But... Now we have to configure it.

Configuration
-------------

[](#configuration)

First, run the command `php artisan config:publish shadomax/wepay-laravel`

Once you've run that command, open up the file `app/config/packages/shadomax/wepay-laravel/config.php`

Now, primarily what you need to change in this file are the production values for `client_id`, `client_secret`, `access_token` and `account_id`.

If you don't have a development environment setup, then set `useStaging = false` otherwise, file in the values for the staging array as well.

After those configuration values are set, you're ready to go.

Code Example
------------

[](#code-example)

```
// This is the route where you would POST a form to
Route::post('/checkout', function() {
    $reference_id = 89678578; // This is some randomly generate ID for your records

    // On most API calls, the first parameter needs to be the access token of the person relieving money, the 2nd is the endpoint as per the WePay API docs and lastly the parameters for the API call as per the docs.
    $response = WepayWrapper::request($user->wepay_token, '/credit_card/create', [
        'client_id' 		=> WepayWrapper::get('client_id'),
        'cc_number' 		=> Input::get('cc_number'),
        'cvv' 				=> Input::get('cvv'),
        'expiration_month' 	=> Input::get('expiration_month'),
        'expiration_year' 	=> Input::get('expiration_year'),
        'user_name' 		=> Input::get('name'),
        'email' 			=> Input::get('email'),
        'address' 			=> [
            'zip' 		=> Input::get('zip'),
            'country' 	=> Input::get('country')
        ]
    ]);

    WepayWrapper::request($user->wepay_token, '/credit_card/authorize', [
        'client_id' 		=> WepayWrapper::get('client_id'),
        'client_secret'		=> WepayWrapper::get('client_secret'),
        'credit_card_id'	=> $response->credit_card_id
    ]);

    WepayWrapper::request($user->wepay_token, '/checkout/create', [
        'account_id' 			=> $user->wepay_id, // This is the account id for whoever is recieving money
        'amount' 				=> Input::get('amount'),
        'currency' 				=> 'USD',
        'short_description' 	=> '',
        'type'					=> 'GOODS',
        'long_description'		=> 'Purchase for , ',
        'reference_id'			=> $reference_id,
        'fallback_uri' 			=> action('CheckoutController@error'),
        'redirect_uri' 			=> action('ProductsController@show', ['id' => '']),
        'funding_sources' 		=> 'cc',
        'payment_method_id' 	=> $response->credit_card_id,
        'payment_method_type' 	=> 'credit_card'
    ]);

    $response = WepayWrapper::request($user->wepay_token, '/checkout/find', [
        'account_id' 			=> $user->wepay_id, // Again, this is the account id for whoever recieved the money
        'reference_id'			=> $reference_id,
    ]);

    // Here you would use the response to store values into the database or however you want to keep track of money that has been processed.
    return $response;
});
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b21c680f8bde45ad683c2d4e66c03ce5b7ff8f8195e93638fb3cae216dff108?d=identicon)[erss400](/maintainers/erss400)

---

Top Contributors

[![mbengchan](https://avatars.githubusercontent.com/u/13599890?v=4)](https://github.com/mbengchan "mbengchan (3 commits)")

### Embed Badge

![Health badge](/badges/shadomax-wepay-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/shadomax-wepay-laravel/health.svg)](https://phpackages.com/packages/shadomax-wepay-laravel)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
