Coder Social home page Coder Social logo

easyphiz's Introduction

📦 一个简单的PhizPay SDK扩展包.

Latest Stable Version Latest Unstable Version Total Downloads License

环境需求

安装

composer require skrleo/easyphiz -vvv

使用示例

基本使用(以统一下单为例):

<?php
use PhizPay\Factory;

$config = array(
    'appid' => '6490171c3b17b00001f52197',
    'mchid' => '1900009191',
    'serial_no' => '5157F09EFDC096DE15EBE81A47057A7232F1B8E1',

    'cert_path' => 'path/to/xxx.pem', // XXX: 绝对路径!!!!
);

$response = Factory::Order($config)->unify(array(
    'trade_type' => 'jsapi', # jsapi| native | micropay
    'out_trade_no' => date('Ymd') . Str::random_int(13),
    'description' => 'mch_10_store_17',
    'amount' => array(
        'total' => '0.01',
        'currency' => 'BRL'
    ),
    'detail' => array(
        'goods_detail' => array(
            array(
                'merchant_goods_id' => '243',
                'quantity' => 1,
                'unit_price' => '0.01',
                'goods_name' => 'NongFuSpring'
            )
        )
    ),
    'payer' => array(
        'openid' => '589e37b9a9ca67b5e269701d3e50a2493719149c',
    ),
    'attach' => array(
        'path' => 'pages/order/detail?order_no=202405092658004622',
        'appletsId' => '6490171c3b17b00001f52197'
    )
));

License

MIT

easyphiz's People

Contributors

skrleo avatar

Watchers

 avatar

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.