支付模块
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

43 linhas
2.3 KiB

  1. package adapay
  2. import (
  3. adapayCore "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/lib/adapay-sdk/adapay-core"
  4. )
  5. type fastPayInterface interface {
  6. CardBind(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  7. CardBindConfirm(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  8. CardBindlist(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  9. Confirm(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  10. SmsCode(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error)
  11. }
  12. type FastPay struct {
  13. *Adapay
  14. }
  15. func (f *FastPay) CardBind(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  16. reqUrl := PAGE_BASE_URL + FAST_CARD_APPLY
  17. return adapayCore.RequestAdaPay(reqUrl, adapayCore.POST, reqParam, f.HandleConfig(multiMerchConfigId...))
  18. }
  19. func (f *FastPay) CardBindConfirm(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  20. reqUrl := PAGE_BASE_URL + FAST_CARD_CONFIRM
  21. return adapayCore.RequestAdaPay(reqUrl, adapayCore.POST, reqParam, f.HandleConfig(multiMerchConfigId...))
  22. }
  23. func (f *FastPay) CardBindlist(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  24. reqUrl := PAGE_BASE_URL + FAST_CARD_LIST
  25. return adapayCore.RequestAdaPay(reqUrl, adapayCore.GET, reqParam, f.HandleConfig(multiMerchConfigId...))
  26. }
  27. func (f *FastPay) Confirm(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  28. reqUrl := BASE_URL + FAST_PAY_CONFIRM
  29. return adapayCore.RequestAdaPay(reqUrl, adapayCore.POST, reqParam, f.HandleConfig(multiMerchConfigId...))
  30. }
  31. func (f *FastPay) SmsCode(reqParam map[string]interface{}, multiMerchConfigId ...string) (map[string]interface{}, *adapayCore.ApiError, error) {
  32. reqUrl := BASE_URL + FAST_PAY_SMS_CODE
  33. return adapayCore.RequestAdaPay(reqUrl, adapayCore.POST, reqParam, f.HandleConfig(multiMerchConfigId...))
  34. }