sangdou/component

《桑豆技术团队》微信开放平台sdk for PHP

dev-main 2023-08-21 10:10 UTC

This package is auto-updated.

Last update: 2024-10-21 12:43:33 UTC


README

微信小程序服务商sdk对接

Usage

基本使用(以服务端为例):

<?php

// 获取预授权码

$options = [
    'component_appid' => 'xxxxxx',
    'component_appsecret' => 'xxxxxx',
    'component_verify_ticket' => 'ticket@@@szjFIJxETzEY24e6IGGVe9y41Cn1WhyedZUKdLL6oPt2_Ng_gmtcUb1ueST_AT7ov9MpCVKRyhGlw-pihojDmA',
];

$obj = ComponentService::getInstance($options)->useComponentToken()->ticket()->apiCreatePreauthcode();