feat: notify supplier and client after payment is done
This commit is contained in:
@@ -3,6 +3,7 @@ package mail
|
||||
import (
|
||||
"net/smtp"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitea.urkob.com/urko/btc-pay-checker/kit"
|
||||
"gitea.urkob.com/urko/btc-pay-checker/kit/cfg"
|
||||
@@ -29,9 +30,13 @@ func init() {
|
||||
|
||||
func Test_mailService_SendOK(t *testing.T) {
|
||||
dto := SendOK{
|
||||
Price: 10.2,
|
||||
Amount: 12.0,
|
||||
ExplorerUrl: "test",
|
||||
TxID: "test-hash",
|
||||
Tx: "test-hash",
|
||||
CustomerID: "client",
|
||||
OrderID: "order",
|
||||
Block: "block",
|
||||
Timestamp: time.Now(),
|
||||
To: config.MailTo,
|
||||
}
|
||||
|
||||
@@ -41,9 +46,13 @@ func Test_mailService_SendOK(t *testing.T) {
|
||||
|
||||
func Test_mailService_SendConfirm(t *testing.T) {
|
||||
dto := SendOK{
|
||||
Amount: 12.0,
|
||||
ExplorerUrl: "test",
|
||||
TxID: "test-hash",
|
||||
BlockHash: "block-hash",
|
||||
Tx: "test-hash",
|
||||
CustomerID: "client",
|
||||
OrderID: "order",
|
||||
Block: "block",
|
||||
Timestamp: time.Now(),
|
||||
To: config.MailTo,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user