# 收银台

> 收银台地址 `/super_cloud/wx/entity_shop/#/cashier/payment`

## 说明

- [接口文档 收银台](http://xiaoyaoji.superdesk.cn/plugins_doc/doc/6X1jB4zGpd)
- ![示例图](./static/20220708095940.jpg)
-

## 已接入的服务项目

```示例
# 已接入楼闪送-下单-在线支付 /api/flashdeliver/wx/order/pay
楼闪送项目[serviceCode=flashdeliver]
消费[bigType=2]
{
    "code": 200,
    "data": "https://wx.palmnest.com/super_cloud/wx/entity_shop/?orderNo=RA1542704696056360960&bigType=2&serviceCode=flashdeliver#/cashier/payment"
}

# 已接入我的钱包-充值 /api/wallet/wechat/front/integral/recharge
充值[bigType=1]
{
    "code": 200,
    "msg": "预支付成功",
    "data": {
        "orderNo": "RA1542704696056360960",
        "payUrl": "https://wx.palmnest.com/super_cloud/wx/entity_shop/?orderNo=RA1542704696056360960&bigType=1#/cashier/payment"
    }
}

# 已接入周边商户-买单-付款 /api/collection/wechat/collection/add
消费[bigType=2]
{
    "code": 200,
    "msg": "支付成功",
    "data": "https://wx.palmnest.com/super_cloud/wx/entity_shop/?orderNo=MERSK20220701111123508_6458&bigType=2#/cashier/payment"
}

```

## 收银台 付款方式选项示例

```

# 收银台-立即支付-【超级云店支付 - [云饭卡 | 福利余额 | 企业钱包 | 企业月结]】 /api/wechat/front/pay/v2/aggregatePayment
{
 "code": 200,
 "data": {
  "orderNo": "LS202211290939359465",
  "payUrl": "https://wx.palmnest.com/super_cloud/wx/entity_shop/#/cashier/payResult?code=SUCCESS&orderNo=LS202211290939359465&serviceCode=flashdeliver",
  "resMap": null,
  "appId": null,
  "timeStamp": null,
  "nonceStr": null,
  "signType": null,
  "paySign": null,
  "prepayId": null,
  "dealPage": null
 }
}

# 收银台-立即支付-【第三方支付 - [微信支付(微信JSAPI支付)]】 /api/wechat/front/pay/v2/aggregatePayment
{
 "code": 200,
 "data": {
  "orderNo": "LS202211290945498182",
  "payUrl": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23c14df881a4edea&redirect_uri=https%3A%2F%2Fwx.palmnest.com%2Fsuper_cloud%2Fapi%2Fwechat%2Ffront%2Fpay%2Fv2%2Fauthorize&response_type=code&scope=snsapi_base&state=LS202211290945498182",
  "resMap": null,
  "appId": null,
  "timeStamp": null,
  "nonceStr": null,
  "signType": null,
  "paySign": null,
  "prepayId": null,
  "dealPage": null
 }
}


# 收银台-立即支付- 【第三方支付 - [微信支付(微信小程序支付)】 /api/wechat/front/pay/v2/aggregatePayment
依赖小程序原生页面实现
{
 "code": 200,
 "data": {
  "appId": "wx0efbe4601aed7dfe",
  "dealPage": "https%3A%2F%2Fwx.palmnest.com%2Fsuper_cloud%2Fwx%2Fentity_shop%2F%23%2Fcashier%2FpayResult%3FserviceCode%3Dcloud_wallet",
  "nonceStr": "axkGSXgBchGifl64HdHjBvA5AcStULxi",
  "orderId": "RA1597407225587183616",
  "orderNo": "RA1597407225587183616",
  "package": "prepay_id=wx290948576614173d7273caa71d6fb90000",
  "paySign": "0A4126F5EADAB3D778D5939C36C7D655",
  "prepayId": "wx290948576614173d7273caa71d6fb90000",
  "signType": "MD5",
  "timeStamp": "1669686537",
  "timestamp": "1669686537"
 }
}
# 收银台-立即支付- 【第三方支付 - [微信支付(微信H5支付)】 /api/wechat/front/pay/v2/aggregatePayment
{
  "code": 200,
  "data": {
    "orderNo": null,
    "payUrl": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx081015004171686ddb4cfeede85a9e0000&package=490011609&redirect_url=https://wx.palmnest.com/super_cloud/wx/wxpay/h5/redirect_result.html?orderNo=K240108101354293",
    "resMap": null,
    "appId": null,
    "timeStamp": null,
    "nonceStr": null,
    "signType": null,
    "paySign": null,
    "prepayId": null,
    "dealPage": null
  }
}
<!-- 新 -->
{
    "code": 200,
    "data": {
        "orderNo": null,
        "payUrl": "https://www.avic-s.com/super_cloud/wx/wxpay/h5/redirect.html?payURL=https%3A%2F%2Fwx.tenpay.com%2Fcgi-bin%2Fmmpayweb-bin%2Fcheckmweb%3Fprepay_id%3Dwx171107558409061ad613b20adc57b60000%26package%3D421447122%26redirect_url%3Dhttps%3A%2F%2Fwww.avic-s.com%2Fsuper_cloud%2Fwx%2Fwxpay%2Fh5%2Fredirect_result.html%3ForderNo%3DMC240617110649809",
        "resMap": null,
        "appId": null,
        "timeStamp": null,
        "nonceStr": null,
        "signType": null,
        "paySign": null,
        "prepayId": null,
        "dealPage": null
    }
}
```

## 收银台页面

```
# 海威特权
https://wx.palmnest.com/super_cloud/wx/entity_shop/?serviceCode=haiwei#/cashier/payment
# 云店（楼闪送）
https://wx.palmnest.com/super_cloud/wx/entity_shop/?serviceCode=flashdeliver#/cashier/payment
# 默认
https://wx.palmnest.com/super_cloud/wx/entity_shop/#/cashier/payment
```

## 支付结果页面

```
# 默认
https://wx.palmnest.com/super_cloud/wx/entity_shop/#/cashier/payResult
# 楼闪送
https://wx.palmnest.com/super_cloud/wx/entity_shop/?serviceCode=flashdeliver#/cashier/payResult
# 钱包
https://wx.palmnest.com/super_cloud/wx/entity_shop/?serviceCode=cloud_wallet#/cashier/payResult
```

## 小程序 H5 调用微信小程序支付说明

`pages/payment/wxPay`是新版接入收银台用的
`pages/mail/mail/wxPay`是旧楼闪送用的
宿主小程序小程序页面文件

```json
{
  "path": "pages/payment/wxPay",
  "style": {
    "navigationBarTitleText": "支付中"
  }
},
{
  "path": "pages/mail/mail/wxPay",
  "style": {
  "navigationBarTitleText": "",
    "enablePullDownRefresh": false
    }
},
```

## 其它

- [微信小程序如何配置银联云闪付支付](https://developers.weixin.qq.com/community/develop/article/doc/0000e60ecf08e880ed0d561215ac13)
