<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>webhook on </title>
    <link>/tags/webhook/</link>
    <description>Recent content in webhook on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 09 Apr 2026 10:00:00 +0800</lastBuildDate><atom:link href="/tags/webhook/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Stripe 支付接入基线：PaymentIntent 抽象、Mock/真实网关切换与后续 Webhook 演进</title>
      <link>/posts/stripe-payment-integration/</link>
      <pubDate>Thu, 09 Apr 2026 10:00:00 +0800</pubDate>
      
      <guid>/posts/stripe-payment-integration/</guid>
      <description>📦 本文基于的完整项目源码：https://github.com/meirongdev/shop
电商系统接入支付时，第一步通常不是“把所有 webhook 和退款补偿一次做完”，而是先把支付入口、provider 边界和返回模型抽清楚。Shop Platform 当前已经完成的是这条基线：buyer-bff 统一调用 wallet-service，wallet-service 再按支付方式路由到 Stripe / PayPal / Klarna / 内部 Wallet。
更准确地说，当前仓库已经具备：
统一的 WalletApi.PAYMENT_INTENT / PAYMENT_METHODS 合约 PaymentProviderService 里的 provider routing Stripe 真/假网关切换（StripePaymentGateway / MockPaymentGateway） buyer-bff 对 clientSecret / redirectUrl 的透传 但还没有把 Stripe webhook、Stripe Refund API、事件幂等表、Payment Element 前端确认链路真正提交进来。所以这篇文章也应该按“已落地基线 + 明确演进方向”来写，而不是把未来设计写成现状。
当前支付架构 flowchart TD Client[&#34;客户端 / SSR Portal&#34;] BFF[&#34;buyer-bff&#34;] Wallet[&#34;wallet-service&#34;] Provider[&#34;PaymentProviderService&#34;] Stripe[&#34;StripeGateway&#34;] Paypal[&#34;PayPal Orders API&#34;] Klarna[&#34;Klarna Sessions API&#34;] Internal[&#34;WalletApplicationService&#34;] Client --&gt;|&#34;checkout / payment intent&#34;</description>
    </item>
    
  </channel>
</rss>
