All Projects → overtrue → laravel-payment

overtrue / laravel-payment

Licence: other
Omnipay ServiceProvider for Laravel.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-payment

Omnipay Pingpp
A Ping++ driver for the Omnipay PHP payment processing library. 一个聚合了支付宝(APP、Wap、PC、即时到账、扫码、企业付款),微信(APP、公众号、红包), 银联网关、银联企业网银、Apple Pay、QQ 钱包、易宝支付、百度钱包、京东支付、京东白条、招行一网通、分期支付等国内主流支付渠道的聚合支付网关(Ping++, also known as Pingpp/Pingxx/Pingplusplus)
Stars: ✭ 227 (+155.06%)
Mutual labels:  alipay, payment-gateway, wechat-pay
A3Mall
A3Mall B2C开源商城系统使用Thinkphp6开源框架,前端采用uniapp开发,支持微信公众号商城、H5商城、小程序商城、APP商城、PC商城,前后端源码100%开源,支持免费商用。
Stars: ✭ 142 (+59.55%)
Mutual labels:  alipay, wechat-pay
omnipay-2checkout
2Checkout driver for the Omnipay PHP payment processing library
Stars: ✭ 25 (-71.91%)
Mutual labels:  omnipay, payment-gateway
Profit
🤔 biezhi 在线打赏系统,开启你的要饭生涯。
Stars: ✭ 372 (+317.98%)
Mutual labels:  alipay, wechat-pay
omnipay-sagepay
Sage Pay driver for the Omnipay PHP payment processing library
Stars: ✭ 48 (-46.07%)
Mutual labels:  omnipay, payment-gateway
AppPay
💸 AppPay专注于App支付的库,几句代码轻松搞定微信支付、支付宝支付。集成更简单。
Stars: ✭ 33 (-62.92%)
Mutual labels:  alipay, wechat-pay
profit
🤔 biezhi 在线打赏系统,开启你的要饭生涯。
Stars: ✭ 378 (+324.72%)
Mutual labels:  alipay, wechat-pay
Getreceipt Server
个人收款服务端
Stars: ✭ 110 (+23.6%)
Mutual labels:  alipay, wechat-pay
Pay Python
轻量级支付方式整合集成,实现支付与业务完全剥离,快速简单完成支付模块的开发,代码实现优雅灵活,横向扩展简单
Stars: ✭ 109 (+22.47%)
Mutual labels:  alipay, wechat-pay
Rageframe2
一个基于Yii2高级框架的快速开发应用引擎
Stars: ✭ 1,553 (+1644.94%)
Mutual labels:  alipay, wechat-pay
Icanpay.donet
统一支付网关。支持NET46和NETSTANDARD2_0。支持支付宝,微信,银联支付渠道通过Web,App,Wap,QRCode方式支付。简化订单的创建、查询、退款跟接收网关返回的支付通知等功能
Stars: ✭ 62 (-30.34%)
Mutual labels:  alipay, payment-gateway
Youzanpayportal
利用有赞云和有赞微小店实现个人收款解决方案
Stars: ✭ 171 (+92.13%)
Mutual labels:  alipay, wechat-pay
Payment
Payment是php版本的支付聚合第三方sdk,集成了微信支付、支付宝支付、招商一网通支付。提供统一的调用接口,方便快速接入各种支付、查询、退款、转账能力。服务端接入支付功能,方便、快捷。
Stars: ✭ 2,293 (+2476.4%)
Mutual labels:  alipay, wechat-pay
Merger
📲 Merge Your Qrcodes Together. Even Quicker.
Stars: ✭ 218 (+144.94%)
Mutual labels:  alipay
direct-alipay
alipay api for nodejs
Stars: ✭ 36 (-59.55%)
Mutual labels:  alipay
Django2 dailyfresh
dailyfresh电商项目,替换django框架为2.X并重构,美化了下后台管理页面,提供docker版本,该项目包含了实际开发中的电商项目中大部分的功能开发和知识点实践, 是一个非常不错的django学习项目,同时也记录在替换框架中遇到的坑,希望对各位的学习有所帮助。
Stars: ✭ 212 (+138.2%)
Mutual labels:  alipay
Alipay Sdk Java All
支付宝开放平台 Alipay SDK for Java
Stars: ✭ 210 (+135.96%)
Mutual labels:  alipay
node-vn-payments
Various VN Payment Gateways implemented for NodeJS
Stars: ✭ 110 (+23.6%)
Mutual labels:  payment-gateway
WHMCS-JSJ-API-Pay-Gateway
WHMCS 财务系统对接金莎云免签支付API(你们怎么用,与我无瓜好吧:)
Stars: ✭ 58 (-34.83%)
Mutual labels:  alipay
Alipay
Alipay Node.js SDK 基于最新版蚂蚁金服 支付宝开发文档
Stars: ✭ 203 (+128.09%)
Mutual labels:  alipay

Laravel Payment

💳 Omnipay ServiceProvider for Laravel.

Build Status Latest Stable Version Total Downloads License composer.lock

Installing

$ composer require overtrue/laravel-payment -v

After updated composer, if you are using laravel version < 5.5, you need to register service provider:

// config/app.php

    'providers' => [
        //...
        Overtrue\LaravelPayment\ServiceProvider::class,
    ],

And publish the config file:

$ php artisan vendor:publish --provider=Overtrue\\LaravelPayment\\ServiceProvider

if you want to use facade mode, you can register a facade name what you want to use, for example LaravelPayment:

// config/app.php

    'aliases' => [
        'LaravelPayment' => Overtrue\LaravelPayment\Facade::class, // This is default in laravel 5.5
    ],

configuration

// config/payments.php

    // The default gateway name which configured in `gateways` section.
    'default_gateway' => 'paypal',

    // The default options for every gateways.
    'default_options' => [
        'test_mode' => true,
        // ...
    ],

    /*
     * The gateways, you can config option by camel case or snake_case name.
     *
     * the option name is followed from gateway class, for example:
     *
     * $gateway->setMchId('overtrue');
     *
     * you can configured as:
     *  'mch_id' => 'overtrue',
     * or:
     *  'mchId' => 'overtrue',
     */
    'gateways' => [
        'paypal' => [
            'driver' => 'PayPal_Express',
            'options' => [
                'username' => env('PAYPAL_USERNAME'),
                'password' => env('PAYPAL_PASSWORD'),
                'signature' => env('PAYPAL_SIGNATURE'),
                'test_mode' => env('PAYPAL_TEST_MODE'),
            ],
        ],
        // other gateways
    ],

install payment gateways

You need to install the gateway you want to use: omnipay#payment-gateways

Usage

Gateway instance:

LaravelPayment::gateway('GATEWAY NAME'); // GATEWAY NAME is key name of `gateways` configuration.
LaravelPayment::gateway('alipay');
LaravelPayment::gateway('paypal');

Using default gateway:

LaravelPayment::purchase(...);

Example:

$formData = [
    'number' => '4242424242424242', 
    'expiryMonth' => '6', 
    'expiryYear' => '2030', 
    'cvv' => '123'
];

$response = LaravelPayment::purchase([
    'amount' => '10.00', 
    'currency' => 'USD', 
    'card' => $formData,
))->send();

if ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
} elseif ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response);
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}

For more use about Omnipay, please refer to Omnipay Official Home Page

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].