@charge = Charge.find( charge_id ) result = PaymentGateway.process( @charge ) generate_receipt if result.success? broadcast_status end end Thursday 07 February 13
@charge = Charge.find( charge_id ) result = PaymentGateway.process( @charge ) generate_receipt if result.success? broadcast_status end end def generate_receipt fetch('queue/receipts').publish( @charge.id ) end Thursday 07 February 13
@charge = Charge.find( charge_id ) result = PaymentGateway.process( @charge ) generate_receipt if result.success? broadcast_status end end def generate_receipt fetch('queue/receipts').publish( @charge.id ) end def broadcast_status fetch('topics/charge_status').publish( @charge.id ) end Thursday 07 February 13
ChargeProcessor end topic '/topic/charge_status' do processor StatusProcessor processor TesterProcessor processor AlertAdminProcessor end end Thursday 07 February 13