正在显示
1 个修改的文件
包含
70 行增加
和
1 行删除
| 1 | -海关总署(179) | 1 | +海关总署(179号) |
| 2 | === | 2 | === |
| 3 | + | ||
| 4 | +### install | ||
| 5 | + | ||
| 6 | +``` | ||
| 7 | +composer require lackoxygen/customs | ||
| 8 | +``` | ||
| 9 | + | ||
| 10 | +### git | ||
| 11 | + | ||
| 12 | +``` | ||
| 13 | +http://47.107.73.162:8099/lackoxygen/customs.git | ||
| 14 | +``` | ||
| 15 | + | ||
| 16 | +### 配置仓库 | ||
| 17 | + | ||
| 18 | +``` | ||
| 19 | +{ | ||
| 20 | + "type": "git", | ||
| 21 | + "url": "http://47.107.73.162:8099/lackoxygen/customs.git" | ||
| 22 | +} | ||
| 23 | +``` | ||
| 24 | + | ||
| 25 | +### 配置文件 | ||
| 26 | + | ||
| 27 | +``` | ||
| 28 | +php artisan vendor:publish --tag=lackoxygen-customs | ||
| 29 | +``` | ||
| 30 | + | ||
| 31 | +### 示例 | ||
| 32 | + | ||
| 33 | +``` | ||
| 34 | + $serviceTime = Carbon::now()->getPreciseTimestamp(3); | ||
| 35 | + $payExchangeInfoHead = PayExchangeInfoHead::make(); | ||
| 36 | + $payExchangeInfoItem = PayExchangeInfoItem::make(); | ||
| 37 | + $exInfo->setSessionID(self::getUpperUUID()); | ||
| 38 | + $payExchangeInfoHead->setGuid(self::getUpperUUID()); | ||
| 39 | + $payExchangeInfoHead->setInitalRequest('原始请求');//支付原始请求 | ||
| 40 | + $payExchangeInfoHead->setInitalResponse('ok');//支付原始返回 | ||
| 41 | + $payExchangeInfoHead->setEbpCode(config('customs.platform_code')); | ||
| 42 | + $payExchangeInfoHead->setPayCode(self::transformPayCustomsCode($order->payment->pay_type)); | ||
| 43 | + $payExchangeInfoHead->setPayTransactionId($order->payment->third_party_sn); | ||
| 44 | + $payExchangeInfoHead->setTotalAmount((float)$order->price); | ||
| 45 | + $payExchangeInfoHead->setCurrency(142);//人民币 | ||
| 46 | + $payExchangeInfoHead->setVerDept(3); | ||
| 47 | + $payExchangeInfoHead->setPayType(1); | ||
| 48 | + $payExchangeInfoHead->setTradingTime(date('YmdHis', strtotime($order->payment->pay_time))); | ||
| 49 | + $payExchangeInfoHead->setNote('推单'); | ||
| 50 | + $exInfo->setPayExchangeInfoHead($payExchangeInfoHead); | ||
| 51 | + | ||
| 52 | + $payExchangeInfoItem->setOrderNo($order->order_sn); | ||
| 53 | + foreach ($order->orderGoods as $orderGood) { | ||
| 54 | + $goodsItem = GoodsInfoItem::make(); | ||
| 55 | + $goodsItem->setGname($orderGood->title); | ||
| 56 | + $goodsItem->setItemLink(RetailGoodsService::reverseBack($orderGood->retail_goods_id)); | ||
| 57 | + $payExchangeInfoItem->pushGoodsInfo($goodsItem); | ||
| 58 | + } | ||
| 59 | + $payExchangeInfoItem->setRecpAccount(self::getPaymentMerchantId($order->payment->pay_type)); | ||
| 60 | + $payExchangeInfoItem->setRecpCode(config('customs.social_credit_code')); | ||
| 61 | + $payExchangeInfoItem->setRecpName(config('customs.receiving_company')); | ||
| 62 | + | ||
| 63 | + $exInfo->pushPayExchangeInfoLists($payExchangeInfoItem); | ||
| 64 | + | ||
| 65 | + $exInfo->setServiceTime($serviceTime); | ||
| 66 | + | ||
| 67 | + $exInfo->setCertNo(config('customs.cert_no')); | ||
| 68 | +``` | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + |
-
请 注册 或 登录 后发表评论