Bläddra i källkod

澳門國際銀行支付

tags/v1.5.2
jiaoboxiang 2 år sedan
förälder
incheckning
2f4c67aaf4
1 ändrade filer med 34 tillägg och 0 borttagningar
  1. +34
    -0
      test/ada_pay_test.go

+ 34
- 0
test/ada_pay_test.go Visa fil

@@ -5,6 +5,7 @@ import (
zhios_pay_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/utils"
"fmt"
"testing"
"time"
)

func TestMemberCreate(t *testing.T) {
@@ -177,3 +178,36 @@ func TestPaymentQueryList(t *testing.T) {
}
t.Log(zhios_pay_utils.SerializeStr(data))
}

func TestCreateAliPayQr(t *testing.T) {
Adapay, err := adapay.GetAdapayByDBSysConfig("jiuhuicang", "app_a794b158-359b-4e5a-8464-5bd8f171bb6e", "api_live_419ec107-9854-45e8-af12-070efcef6ae9", "api_test_d6485653-c09e-405f-b386-8ef2936dfb97", "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwN6xgd6Ad8v2hIIsQVnbt8a3JituR8o4Tc3B5WlcFR55bz4OMqrG/356Ur3cPbc2Fe8ArNd/0gZbC9q56Eb16JTkVNA/fye4SXznWxdyBPR7+guuJZHc/VW2fKH2lfZ2P3Tt0QkKZZoawYOGSMdIvO+WqK44updyax0ikK6JlNQIDAQAB",
"MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMxVAwWM79+2Lx1TYA4muHy40AbwcBwXmvgNJGp2gq7bcDaNd5cmvXndwS6exV2hIGo8er0Qu3myGrwD/4BIoqCDSuqYfJkrlKzKM30+WAfwRulrFW+SOr6qCvGFF2bMdL884NMgd5PCpayASONq/blefQ3/Ic+c0gtZQxJzYzxLAgMBAAECgYEAyS+rGfv68zpeiXFeUpCtdaBCs5Jp0D8txq6p/GlTovdNNWl1Js5uIV/GpjCOA/JyCCgkcaPX86r5x8Xn/FeIRt/U1kkGs2zvKcxQntkOhmzMdDe7/FuwbRUUeM6LWGIc5AeQcBWYZeS8HAFMnlWho+knMqqgHC/fgUyon6YgMAECQQDyjJYSp+hdhTnvo88GPisQEPOoZRbrUnVFbwjD/OrQT7s6uSlbTAJRXGEYfdeaWsh2CoFl986pOqc/84E/Lr3LAkEA16nd1J3stk9XtC4i+iiXY0codiK24kU+pMcEm8NNyMV1nQT5iTcDA1ZeJCgamJZFeqcfyusimBNbCXdBKk2rgQJBAIymodAntkOlIjepEkBYhLhIXENme6fypTaicL7WR4SM99HR1f2vUhjELTn6n7BOvLhW1zq+PQU9kgcvud9dx4kCQFSMXtBFHZEXp/2WfNXv5fHg6sbtsx8gIH//GhpqxerpJsPpOF8H9yFu0beBFXQurYx5SqiF6GkQZYdffme0TYECQQDgOdQxysI1FEM/l8BDnQgmnO7sJqUtP9HsVcKElGdkJMZGqb8B5rt12y4dxpyVfyaTMZZZjqIx8zgQBhn+l0NJ")
if err != nil {
t.Error(err)
}
param := map[string]interface{}{
"order_no": "2022102002",
"app_id": Adapay.AppId,
"pay_channel": "alipay_qr",
"pay_amt": "0.01",
"mch_req_time": time.Now().Format("2006-01-02 15:04:05"),
"goods_title": "自营商城商品",
"goods_desc": "自营商城商品",
"description": zhios_pay_utils.SerializeStr(map[string]interface{}{
"order_type": "mall_goods",
"pay_method": "ada_alipay",
"mid": "123456",
}),
"device_info": map[string]interface{}{
"device_ip": "221.4.210.165",
},
"notify_url": "http://inapi.izhyin.cn/api/v1/mall/pay/ada/callback",
}
data, apiError, err := Adapay.Payment().Create(param)
if err != nil || apiError != nil { // 网络或本应用异常
t.Error(err)
t.Error(apiError)
return
}
t.Log(zhios_pay_utils.SerializeStr(data))
}

Laddar…
Avbryt
Spara