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.0100 USDC
Pay to @book
Wallet 0xc215...d7c7

Information-circle Not logged in. Payment will only be linked to wallet address.

Information-circle Payment goes directly to the author. For refunds, please contact the author.

Download Pickful App

Better experience on mobile

iOS QR

iOS

Android QR

Android

APK QR

APK