Skip to content

Latest commit

 

History

History
224 lines (158 loc) · 6.64 KB

AlipayOpenAppMembersApi.md

File metadata and controls

224 lines (158 loc) · 6.64 KB

Alipay\OpenAPISDK\AlipayOpenAppMembersApi

All URIs are relative to https://openapi.alipay.com.

Method HTTP request Description
create() POST /v3/alipay/open/app/members/create 应用添加成员
delete() DELETE /v3/alipay/open/app/members/delete 应用删除成员
query() GET /v3/alipay/open/app/members/query 应用查询成员列表

create()

create($alipayOpenAppMembersCreateModel): object

应用添加成员

应用添加成员,目前只支持小程序类型的应用使用

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Alipay\OpenAPISDK\Api\AlipayOpenAppMembersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

// 初始化alipay参数
$alipayConfig = new \Alipay\OpenAPISDK\Util\Model\AlipayConfig();
$alipayConfig->setAppId('app_id');
$alipayConfig->setPrivateKey('private_key');
// 密钥模式
$alipayConfig->setAlipayPublicKey('alipay_public_key');
// 证书模式
// $alipayConfig->setAppCertPath('../appCertPublicKey.crt');
// $alipayConfig->setAlipayPublicCertPath('../alipayCertPublicKey_RSA2.crt');
// $alipayConfig->setRootCertPath('../alipayRootCert.crt');
$alipayConfig->setEncryptKey('encrypt_key');
$alipayConfigUtil = new \Alipay\OpenAPISDK\Util\AlipayConfigUtil($alipayConfig);
$apiInstance->setAlipayConfigUtil($alipayConfigUtil);

$alipayOpenAppMembersCreateModel = new \Alipay\OpenAPISDK\Model\AlipayOpenAppMembersCreateModel(); // \Alipay\OpenAPISDK\Model\AlipayOpenAppMembersCreateModel

try {
    $result = $apiInstance->create($alipayOpenAppMembersCreateModel);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlipayOpenAppMembersApi->create: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
alipayOpenAppMembersCreateModel \Alipay\OpenAPISDK\Model\AlipayOpenAppMembersCreateModel [optional]

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

delete()

delete($userId, $openId, $role): object

应用删除成员

删除应用成员,目前只支持小程序类型的应用

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Alipay\OpenAPISDK\Api\AlipayOpenAppMembersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

// 初始化alipay参数
$alipayConfig = new \Alipay\OpenAPISDK\Util\Model\AlipayConfig();
$alipayConfig->setAppId('app_id');
$alipayConfig->setPrivateKey('private_key');
// 密钥模式
$alipayConfig->setAlipayPublicKey('alipay_public_key');
// 证书模式
// $alipayConfig->setAppCertPath('../appCertPublicKey.crt');
// $alipayConfig->setAlipayPublicCertPath('../alipayCertPublicKey_RSA2.crt');
// $alipayConfig->setRootCertPath('../alipayRootCert.crt');
$alipayConfig->setEncryptKey('encrypt_key');
$alipayConfigUtil = new \Alipay\OpenAPISDK\Util\AlipayConfigUtil($alipayConfig);
$apiInstance->setAlipayConfigUtil($alipayConfigUtil);

$userId = 208822294389xxxx; // string | 被删除成员的支付宝账户唯一标识,以2088开头。
$openId = 074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5; // string | 被删除成员的openId。
$role = DEVELOPER; // string | 被删除成员的角色类型

try {
    $result = $apiInstance->delete($userId, $openId, $role);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlipayOpenAppMembersApi->delete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
userId string 被删除成员的支付宝账户唯一标识,以2088开头。 [optional]
openId string 被删除成员的openId。 [optional]
role string 被删除成员的角色类型 [optional]

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

query()

query($role): \Alipay\OpenAPISDK\Model\AlipayOpenAppMembersQueryResponseModel

应用查询成员列表

应用查询成员列表,目前只支持小程序类型的应用

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Alipay\OpenAPISDK\Api\AlipayOpenAppMembersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

// 初始化alipay参数
$alipayConfig = new \Alipay\OpenAPISDK\Util\Model\AlipayConfig();
$alipayConfig->setAppId('app_id');
$alipayConfig->setPrivateKey('private_key');
// 密钥模式
$alipayConfig->setAlipayPublicKey('alipay_public_key');
// 证书模式
// $alipayConfig->setAppCertPath('../appCertPublicKey.crt');
// $alipayConfig->setAlipayPublicCertPath('../alipayCertPublicKey_RSA2.crt');
// $alipayConfig->setRootCertPath('../alipayRootCert.crt');
$alipayConfig->setEncryptKey('encrypt_key');
$alipayConfigUtil = new \Alipay\OpenAPISDK\Util\AlipayConfigUtil($alipayConfig);
$apiInstance->setAlipayConfigUtil($alipayConfigUtil);

$role = DEVELOPER; // string | 查询的成员角色类型

try {
    $result = $apiInstance->query($role);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlipayOpenAppMembersApi->query: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role string 查询的成员角色类型 [optional]

Return type

\Alipay\OpenAPISDK\Model\AlipayOpenAppMembersQueryResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]