Git Product home page Git Product logo

laravel-alipay's Introduction

Alipay

Build Status Latest Stable Version Latest Unstable Version Total Downloads License Scrutinizer Code Quality Code Coverage FOSSA Status

基于Laravel框架的支付宝支付SDK,目前仅支持当面付

Installation

$ composer require kaylyu/laravel-alipay:~1.0" -vvv

Config

  • 配置 可以拷贝config/kaylu-alipay.php 到 laravel 目录config下面
[
    'response_type' => 'collection',//collection array json object
    'log' => [
        'file' => __DIR__ . '/logs/kaylu-alipay.log',
        'level' => 'debug',
    ],
    'http' => [
        'timeout' => 30,
    ],
    //当面付
    'f2fpay' => [
        //签名方式,默认为RSA2(RSA2048)
        'sign_type' => "RSA2",

        //支付宝公钥
        'alipay_public_key' => "",

        //商户私钥
        'merchant_private_key' => "",

        //编码格式
        'charset' => "UTF-8",

        //支付宝网关
        'gateway_url' => "https://openapi.alipaydev.com/gateway.do",

        //应用ID
        'app_id' => "",

        //异步通知地址,只有扫码支付预下单可用
        'notify_url' => "http://www.baidu.com",
    ]
]

Usage

  • 注册对应Service Provider
    // laravel >= 5.5
    Kaylyu\Alipay\F2fpay\ServiceProvider::class
    
    // lumen
    $app->register(Kaylyu\Alipay\F2fpay\ServiceProvider::class);
  • 使用
    //统一收单线下交易预创建(扫码支付)
    app('kaylu.alipay.f2fpay')->order->qrPay

laravel-alipay's People

Contributors

kaylyu avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

fossabot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.