You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.9 KiB
Markdown

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
Created: 2024-04-24 16:51 Wed
Updated: 2025-07-15 10:28 Tue
cssclasses:
- img-grid
---
### Merchant SERVER API
**Do NOT invoke PP API from client side directly**
- **方案1**: 数据由后端管理
1. 保存生成的链接
2. 支付中心页面, 请求后端生成PayPal订单
3. 后端使用保存的信息, 生成PayPal请求订单: *createOrder*
- **方案2**: 数据由链接管理
1. 将链接原文发送后端
### Checkout API
[Checkout](https://developer.paypal.com/docs/checkout/)
### Todo
1. [ ] 自动分期, 每月发给客人/每月提醒顾问 2025-03-04
2. [ ] 调整信用卡付款的推荐等级: 尾款不推荐; 大额不推荐
- 优化成本, 提高利润
- 与PayPal谈判费率的空间
#### 旧的链接, 没有使用 order v2的
1. 报价信(无分项, 含景点描述)(F) [PriceLetter](http://202.103.68.35/CustomerManager/english/PriceLetteren.asp?coli_sn=1138664&LGC=1&price_detail=0&VType=2&VTime=5933322)
![left|200](Haina/项目/支付中心Payment/atta/lQLPJx3uV1Cs3YPNAtPNA7ewuLwP2tFVX-MHqbZasIOdAA_951_723.png)
2. 新版确认信(S)->发送邮件(报价/确认信以附件形式)
![left|200](Haina/项目/支付中心Payment/atta/lQDPKGKlP0-J60vNBaDNB4CwZS-YyMJpe_4HrWnfOiU-AA_1920_1440.jpg)![left|200](Haina/项目/支付中心Payment/atta/lQDPKdPhCAWlo4vNBaDNB4CwWuFFgJU24E0HrWoFutE8AA_1920_1440.jpg)
3. App native. app内调起sdk支付
### ACDC
#### Credit card
1. [ ] PayPal本地支付没有结果, `APPROVED`之后无结果\
![](Haina/项目/支付中心Payment/atta/p24-approved-but-not-completed.json)
2. [ ] 客人页面: ACDC 显示成功; 后续失败`DECLINED`\
![](Haina/项目/支付中心Payment/atta/ACDC-order%20completed%20but%20capture%20DECLINED.json)
3. [ ] 记录approved事件 2024-08-27
#### Google Pay
### ACDC 报告
~~已在后台设置好账号 <pays@chinahighlights.com> 的ACDC 报告通过报告页面找到“Custom Templates”里的“ACDCReport”可以下载查看。如果需要自动下载“ By Schedule”可以授权PayPal开通账号的SFTP功能后期会每天自动下载。~~
~~点击“ View Report” 就可以查看下载好的报告目前我先从后台提交了7.1至今的交易报告供查看。~~
通过筛选报告里面的“card type/卡类型”  “Payment Source/付款来源” 2个字段来区分ACDC和Apple Pay/ Google Pay的付款。
“card type/卡类型”里面有显示VISA和MASTERCARD的就是ACDC的交易同时“Payment Source/付款来源”里会显示信用卡直接付款。
“Payment Source/付款来源”里面显示有Apple Pay 和Google Pay的则是来自于这2个渠道的付款。
### Reference Source
- [支持的国家和地区](https://www.paypal.com/ng/webapps/mpp/country-worldwide)
- [PayPal API Status](https://www.paypal-status.com/api/production)
- [Payment methods](https://developer.paypal.com/docs/checkout/payment-methods/)
- [ACDC支持](https://developer.paypal.com/docs/checkout/advanced/eligibility/)
- [测试卡](https://developer.paypal.com/tools/sandbox/card-testing/#link-testgeneratedcardnumbers)
- [卡支付Declined具体原因 response_code](https://developer.paypal.com/docs/api/orders/v2/#definition-processor_response)
### 测试卡
| Card No. | Expiry date | CVC code | Card type |
| ---------------- | ----------- | -------- | --------- |
| 4032036973225392 | 01/2028 | 442 | Visa |
| 343062652211430 | 07/2029 | 8716 | AE |
| 5110920188076348 | 05/2027 | 148 | Master |
### PayPal Notify
#### webhook
3 天内最多重试 25 次
> [!faq] 通知不全
>
> 1. webhook没有发送
> 2. 1. `9BU18513BH318232S`
> 3. 2. `5NP174266F735682P` `CW231214017_T`
> 4. 3. ~~`4NW74413KE195510H` `SHX240325005_T`~~
> 5. 4. ~~`49N102461W2482132` `CA240704075_T`~~
> 6. IPN没有发送
> 7. 1. `39G25248JF041404J` Upsell, 自动转账到账户
> 8. 两个通知都没有
> 9. 1. `2SX71059RU3114540`
> 10. 2. `5XM96027GJ2728935`