func NewEWalletChargeRequestFromInvoice(inv *invoice.Invoice) (*ewallet.CreateEWalletChargeParams, error) {
	switch inv.Payment.PaymentType {
	case payment.SourceOvo:
		return v2.NewOVO(inv)
	case payment.SourceDana:
		return v2.NewDana(inv)
	case payment.SourceLinkAja:
		return v2.NewLinkAja(inv)
	default:
		return nil, fmt.Errorf("unsupported payment method")
	}
}
NewEWalletChargeRequestFromInvoice create ewallet charge params for xendit ewallet API
package xendit
import (
	"fmt"
	"github.com/xendit/xendit-go/ewallet"
	xinvoice "github.com/xendit/xendit-go/invoice"
	"github.com/imrenagi/go-payment"
	v1 "github.com/imrenagi/go-payment/gateway/xendit/ewallet/v1"
	v2 "github.com/imrenagi/go-payment/gateway/xendit/ewallet/v2"
	"github.com/imrenagi/go-payment/gateway/xendit/xeninvoice"
	"github.com/imrenagi/go-payment/invoice"
)