Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/songlipeng2003/sf-bsp-sdk
顺丰 BSP SDK
https://github.com/songlipeng2003/sf-bsp-sdk
Last synced: 5 days ago
JSON representation
顺丰 BSP SDK
- Host: GitHub
- URL: https://github.com/songlipeng2003/sf-bsp-sdk
- Owner: songlipeng2003
- Created: 2016-07-21T10:40:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-29T08:17:00.000Z (over 8 years ago)
- Last Synced: 2024-10-18T09:13:51.257Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 顺丰 BSP SDK
## 调用方式
创建 client
```
$client = new BSPClient();
$client->url = 'http://218.17.248.244:11080/bsp-oisp/sfexpressService';
$client->accessCode = 'BSPdevelop';
$client->checkWord = 'j8DzkIFgmlomPt0aLuwU';
$client->debug = true; // 是否输出请求响应内容
```调用接口
```
$request = [
'Order' => [
'@attributes' => [
'orderid' => rand(100000, 999999),
'j_company' => '华米科技',
'j_contact' => '宋利鹏',
'j_tel' => '13855106511',
'j_country' => '中国',
'j_province' => '安徽',
'j_city' => '合肥',
'j_county' => '高新区',
'j_address' => '创新产业基地H8栋',
'd_company' => '北京华米科技',
'd_contact' => '测试',
'd_tel' => '电话号码',
'd_province' => '北京',
'd_city' => '北京',
'd_county' => '海淀区',
'd_address' => '上地软件园',
],
'Cargo' => [
'@attributes' => [
'name' => '小米手环',
'count' => 1,
]
]
]
];
$result = $client->api('OrderService', $request);
```更多具体信息查看单元测试