Skip to main content

Book

 · 

PaymentMiddleware

module X402 class PaymentMiddleware < X402::Middleware # 必须继承 def initialize(app) @app = app end

def call(env) status, headers, body = @app.call(env)

# 支付成功后记录
if status == 200 && headers['X-Payment-Response'].present? && env['HTTP_X402_PAYMENT'].present?
binding.pry
begin
payment_json = JSON.parse(en...
Currency-dollar 0.01  USDC
支付給 @book
Wallet 0xc215...d7c7

Information-circle 未登入,支付記錄將僅關聯錢包地址

Information-circle 款項直接支付給作者,如需退款請與作者協商。

Download Pickful App

Better experience on mobile

iOS QR

iOS

Android QR

Android

APK QR

APK