Explorar el Código

fix: 购方类型直接使用 Invoice.invoiceType 原始值

- 微信支付 v3 buyer_information.type 枚举就是 INDIVIDUAL / ORGANIZATION
- 与 Invoice.TYPE_个人 / TYPE_企业 值完全一致,无需转换

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline hace 3 días
padre
commit
e4b648c99a

+ 1 - 2
service/src/main/java/com/kym/service/wechat/impl/WechatPayFapiaoService.java

@@ -118,8 +118,7 @@ public class WechatPayFapiaoService {
         }
 
         var buyerInfo = new HashMap<String, Object>();
-        buyerInfo.put("type", "ORGANIZATION".equals(invoice.getInvoiceType())
-                ? "COMPANY" : "INDIVIDUAL");
+        buyerInfo.put("type", invoice.getInvoiceType());
         buyerInfo.put("name", invoice.getInvoiceTitle());
         if (invoice.getTaxId() != null && !invoice.getTaxId().isBlank()) {
             buyerInfo.put("taxpayer_id", invoice.getTaxId());