外卡开通(支持修改外卡费率) * 接口:/api/v3/tkbs/open_merchant/open_or_update_foreign_card * 请求加密:SM4 返回解密:SM4 */ $config = require __DIR__ . '/bootstrap.php'; $api = new \Lakala\OpenAPISDK\V3\Api\LakalaApi($config, \Lakala\OpenAPISDK\V3\Api\EncryptMode::BOTH); $request = new \Lakala\OpenAPISDK\V3\Model\ModelRequest(); $request->setReqData([ 'open_org_code' => JINGJIAN_ORG_CODE, 'customer_no' => '100130263', 'name' => 'Test Merchant', 'city' => 'Liuzhou', 'address' => 'No.1 Jiefang South Rd', 'fees' => [ ['fee_type' => 'VISA', 'fee' => 0.03], ['fee_type' => 'MASTER', 'fee' => 0.03], ], ]); try { $response = $api->tradeApi('/api/v3/tkbs/open_merchant/open_or_update_foreign_card', $request); print_r($response->getRespData()); echo $response->getCode(); print_r($response->getHeaders()); echo $response->getOriginalText(); } catch (\Lakala\OpenAPISDK\V3\ApiException $e) { echo $e->getMessage(); }