naka1205/alipay-php

Alipay SDK For PHP

v1.7 2020-06-03 05:12 UTC

This package is auto-updated.

Last update: 2024-05-29 03:33:42 UTC


README

用户授权

use Alipay\Client;

$auth_code = $_GET['auth_code'];
$config = [
    'appid'       =>  'app_id',
    'gateway'     =>  'https://openapi.alipay.com/gateway.do',
    'type'        =>  'sign_type',
    'public'      =>  'public_key',
    'private'     =>  'private_key'
];
$aop = new Client($config);
$response = $aop->getToken($auth_code);
var_dump($response);