...
 
Commits (2)
......@@ -31,6 +31,26 @@ func GetAMQPChannel() (*amqp.Channel, error) {
if err != nil {
return nil, err
}
err = amqpChan.ExchangeDeclare(amqpConfig.Exchange, "direct",
true, false, false, false, nil)
if err != nil {
panic(err)
return nil, err
}
_, err = amqpChan.QueueDeclare("payments", true,
false, false, false, nil)
if err != nil {
panic(err)
return nil, err
}
err = amqpChan.QueueBind("payments", "payments", amqpConfig.Exchange, true, nil)
if err != nil {
panic(err)
return nil, err
}
}
return amqpChan, nil
......
......@@ -28,6 +28,9 @@ type Payment struct {
SourceID string
SourcePayerID string
SourceTransactionID string
BudgetID int64
PaymentID int64
}
func (p *Payment) Process() error {
......