Skip to content

Commit

Permalink
fix: defauly paymethod
Browse files Browse the repository at this point in the history
  • Loading branch information
geniuxy committed Aug 2, 2023
1 parent 13edd4b commit 2fc055e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/pay/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

package pay

import (
"fmt"
)

type Interface interface {
CreatePayment(amount int64, user string) (string, string, error)
GetPaymentDetails(sessionID string) (string, int64, error)
Expand All @@ -31,6 +27,8 @@ func NewPayHandler(paymentMethod string) (Interface, error) {
case "wechat":
return &WechatPayment{}, nil
default:
return nil, fmt.Errorf("unsupported payment method: %s", paymentMethod)
//return nil, fmt.Errorf("unsupported payment method: %s", paymentMethod)
//TODO Now set it as the default wechat, and modify it a few days later
return &WechatPayment{}, nil
}
}

0 comments on commit 2fc055e

Please sign in to comment.