# openapi-php-sdk **Repository Path**: chengdu_blue_brothers/openapi-php-sdk ## Basic Information - **Project Name**: openapi-php-sdk - **Description**: 成都蓝色兄弟网络科技有限公司openapi PHP 语言 SDK - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-18 - **Last Updated**: 2024-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 使用Composer安装 ``` composer require chengdu-blue-brothers/openapi-php-sdk ``` # api 接口调用 ```php use BlueBrothers\Openapi\Api\Client; const testMerchantId = "23329"; const testSecretKey = "8db16e8cc8363ed4eb4c14f9520bcc32"; const isProd = false; // 是否是生产环境 try { $client = new Client(testMerchantId, testSecretKey, isProd, 10); $res = $client->RechargeProduct(); } catch (\Exception $e) { echo $e->getMessage(); } ``` # 解密卡密 ```php use BlueBrothers\Openapi\Util; $encCode = 'ezvbQdCehTDO7M7g22FjThOCypEhk/kswonAbdEEVsY='; // 示例的密钥key $secretKey = '8db16e8cc8363ed4eb4c14f9520bcc32'; // 第二步:aes-256-ecb 解密 try { $decryptedCode = Util::getDecodeCardMap($encCode, $secretKey) ; } catch (\Exception $e) { echo $e->getMessage(); } ```