|
|
|
海关总署(179)
|
|
|
|
海关总署(179号)
|
|
|
|
===
|
|
|
|
|
|
|
|
### install
|
|
|
|
|
|
|
|
```
|
|
|
|
composer require lackoxygen/customs
|
|
|
|
```
|
|
|
|
|
|
|
|
### git
|
|
|
|
|
|
|
|
```
|
|
|
|
http://47.107.73.162:8099/lackoxygen/customs.git
|
|
|
|
```
|
|
|
|
|
|
|
|
### 配置仓库
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"type": "git",
|
|
|
|
"url": "http://47.107.73.162:8099/lackoxygen/customs.git"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### 配置文件
|
|
|
|
|
|
|
|
```
|
|
|
|
php artisan vendor:publish --tag=lackoxygen-customs
|
|
|
|
```
|
|
|
|
|
|
|
|
### 示例
|
|
|
|
|
|
|
|
```
|
|
|
|
$serviceTime = Carbon::now()->getPreciseTimestamp(3);
|
|
|
|
$payExchangeInfoHead = PayExchangeInfoHead::make();
|
|
|
|
$payExchangeInfoItem = PayExchangeInfoItem::make();
|
|
|
|
$exInfo->setSessionID(self::getUpperUUID());
|
|
|
|
$payExchangeInfoHead->setGuid(self::getUpperUUID());
|
|
|
|
$payExchangeInfoHead->setInitalRequest('原始请求');//支付原始请求
|
|
|
|
$payExchangeInfoHead->setInitalResponse('ok');//支付原始返回
|
|
|
|
$payExchangeInfoHead->setEbpCode(config('customs.platform_code'));
|
|
|
|
$payExchangeInfoHead->setPayCode(self::transformPayCustomsCode($order->payment->pay_type));
|
|
|
|
$payExchangeInfoHead->setPayTransactionId($order->payment->third_party_sn);
|
|
|
|
$payExchangeInfoHead->setTotalAmount((float)$order->price);
|
|
|
|
$payExchangeInfoHead->setCurrency(142);//人民币
|
|
|
|
$payExchangeInfoHead->setVerDept(3);
|
|
|
|
$payExchangeInfoHead->setPayType(1);
|
|
|
|
$payExchangeInfoHead->setTradingTime(date('YmdHis', strtotime($order->payment->pay_time)));
|
|
|
|
$payExchangeInfoHead->setNote('推单');
|
|
|
|
$exInfo->setPayExchangeInfoHead($payExchangeInfoHead);
|
|
|
|
|
|
|
|
$payExchangeInfoItem->setOrderNo($order->order_sn);
|
|
|
|
foreach ($order->orderGoods as $orderGood) {
|
|
|
|
$goodsItem = GoodsInfoItem::make();
|
|
|
|
$goodsItem->setGname($orderGood->title);
|
|
|
|
$goodsItem->setItemLink(RetailGoodsService::reverseBack($orderGood->retail_goods_id));
|
|
|
|
$payExchangeInfoItem->pushGoodsInfo($goodsItem);
|
|
|
|
}
|
|
|
|
$payExchangeInfoItem->setRecpAccount(self::getPaymentMerchantId($order->payment->pay_type));
|
|
|
|
$payExchangeInfoItem->setRecpCode(config('customs.social_credit_code'));
|
|
|
|
$payExchangeInfoItem->setRecpName(config('customs.receiving_company'));
|
|
|
|
|
|
|
|
$exInfo->pushPayExchangeInfoLists($payExchangeInfoItem);
|
|
|
|
|
|
|
|
$exInfo->setServiceTime($serviceTime);
|
|
|
|
|
|
|
|
$exInfo->setCertNo(config('customs.cert_no'));
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|