Code cleanup
This commit is contained in:
1 parent
dcc9754d43
commit
1307c7bc6e
18 files changed
+129
-459
No files matched your search
@@ -1,41 +0,0 @@
|
||||
package wspay
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"payment-poc/state"
|
||||
"time"
|
||||
)
|
||||
|
||||
type WsPayDb struct {
|
||||
Id uuid.UUID `db:"id"`
|
||||
ShopID string `db:"shop_id"`
|
||||
ShoppingCartID string `db:"shopping_card_id"`
|
||||
TotalAmount int64 `db:"total_amount"`
|
||||
Lang string `db:"lang"`
|
||||
|
||||
CustomerFirstName string `db:"customer_first_name"`
|
||||
CustomerLastName string `db:"customer_last_name"`
|
||||
CustomerAddress string `db:"customer_address"`
|
||||
CustomerCity string `db:"customer_city"`
|
||||
CustomerZIP string `db:"customer_zip"`
|
||||
CustomerCountry string `db:"customer_country"`
|
||||
CustomerPhone string `db:"customer_phone"`
|
||||
|
||||
PaymentPlan string `db:"payment_plan"`
|
||||
CreditCardName string `db:"credit_card_name"`
|
||||
CreditCardNumber string `db:"credit_card_number"`
|
||||
PaymentMethod string `db:"payment_method"`
|
||||
CurrencyCode int `db:"currency_code"`
|
||||
|
||||
DateTime time.Time `db:"date_time"`
|
||||
|
||||
ECI string `db:"eci"`
|
||||
STAN string `db:"stan"`
|
||||
|
||||
Success int `db:"success"`
|
||||
ApprovalCode string `db:"approval_code"`
|
||||
ErrorMessage string `db:"error_message"`
|
||||
ErrorCodes string `db:"error_codes"`
|
||||
|
||||
State state.PaymentState `db:"payment_state"`
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@ type Service struct {
|
||||
|
||||
func (s *Service) CreatePaymentUrl(amount int64) (string, error) {
|
||||
entry, err := s.Provider.CreateEntry(database.PaymentEntry{
|
||||
Gateway: state.GatewayVivaWallet,
|
||||
Gateway: state.GatewayWsPay,
|
||||
State: state.StateInitialized,
|
||||
TotalAmount: amount,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user