async Task Receive() { PaymentNotify notify = new PaymentNotify(_gateways); notify.PaymentSucceed += Notify_PaymentSucceed; notify.PaymentFailed += Notify_PaymentFailed; notify.UnknownGateway += Notify_UnknownGateway; await notify.ReceivedAsync(); }
public async Task Index() { // 订阅支付通知事件 PaymentNotify notify = new PaymentNotify(gatewayList); notify.PaymentSucceed += Notify_PaymentSucceed; notify.PaymentFailed += Notify_PaymentFailed; notify.UnknownGateway += Notify_UnknownGateway; // 接收并处理支付通知 await notify.ReceivedAsync(); }
public async Task Notify() { // 订阅支付通知事件 var notify = new PaymentNotify(_gateways); notify.PaymentSucceed += Notify_PaymentSucceed; notify.PaymentFailed += Notify_PaymentFailed; notify.UnknownGateway += Notify_UnknownGateway; // 接收并处理支付通知 await notify.ReceivedAsync(); }