alphazento/ecommerce

基于 Laravel 的 zento 电商框架

1.0 2020-04-26 23:29 UTC

This package is auto-updated.

Last update: 2024-09-21 00:14:19 UTC


README

支付和结账流程

1. 请求支付网关

通过调用 api: /api/v1/payment/capture/{payment_method}

这将调用 PaymentGateway::capturePayment

http 请求 -> /api/v1/payment/capture/{payment_method} -> PaymentGateway::capturePayment

--> 触发事件 "BeforeCapturePayment"

--> 然后支付方式运行 "capture"

--> 如果支付网关可以 draftOrderAfterCapture then

--> CheckoutService::draftOrder -> 触发事件 'DraftOrder'

--> Zento\Sales\Event\Listener\DraftOrder 将响应该事件,并生成实际订单。