支付模块
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

refund.go 1.1 KiB

123456789101112131415161718192021222324252627
  1. package adapay
  2. import (
  3. "strings"
  4. adapayCore "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/lib/adapay-sdk/adapay-core"
  5. )
  6. type refundInterface interface {
  7. Create(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  8. Query(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  9. }
  10. type Refund struct {
  11. *Adapay
  12. }
  13. func (r *Refund) Create(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  14. reqUrl := BASE_URL + strings.Replace(REFUND_CREATE, "{payment_id}", adapayCore.ToString(reqParam["payment_id"]), -1)
  15. return adapayCore.RequestAdaPay(reqUrl, adapayCore.POST, reqParam, r.HandleConfig(multiMerchConfigId...))
  16. }
  17. func (r *Refund) Query(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  18. reqUrl := BASE_URL + REFUND_QUERY
  19. return adapayCore.RequestAdaPay(reqUrl, adapayCore.GET, reqParam, r.HandleConfig(multiMerchConfigId...))
  20. }