跳至主要內容

Apple Pay 令牌支付


通过集成 Apple Pay 获取的付款令牌进行支付。付款服务机构为 mpgs

相关信息

{domain}/Servlet/JSAPIService.do

https://vmp.eftpay.com.cn/VMP/Servlet/JSAPIService.do

名称类型描述要求
serviceString接口名称,service.mpgs.token.ApplePay
user_confirm_keyString(12)用户Key,由 eftPay 提供
token_idString通过集成 Apple Pay 获取的付款令牌
transaction_amountString(8)金额。要求数字,小数位最大长度为2
out_trade_noString(28)商户订单号
payTypeString(6)支付类型,Mpgs
buyerTypeString(7)设备类型
iosandroidothers
subjectString(256)交易信息
walletString(20)钱包类型,MPGS
bodyString(128)在需要描述各种商品的情况下,建议积累描述商品的字符串
pay_sceneString支付场景,默认请传 TOKEN_APPLE_PAY
fee_typeString(5)货币类型,HKD
tidString(20)商户终端号
notify_urlString(240)通知地址,投产环境只支持 80443 端口,其他端口需要申请
timeString时间,格式:yyyyMMddHHmmss
signString(64)签名

名称类型描述要求
return_statusString(3)返回状态码,代表。注:此参数不可作为交易状态是否成功的判断
其他状态码见 附录3
return_charString(100)返回说明,可能会变化,不能作条件判断
return_status 大于 00 时返回
timeString时间,格式:yyyyMMddHHmmss
return_status >= 00 时返回
signString(64)签名
return_status >= 00 时返回

名称类型描述要求
token_idString通过集成 Apple Pay 获取的付款令牌
user_confirm_keyString用户Key,由 eftPay 提供
trade_noString(64)支付提供方单号
transaction_idString(64)支付提供方单号
gmt_paymentString交易时间,格式:yyyy-MM-dd HH:mm:ss
trade_typeString(10)交易类型
SALE
pay_sceneString支付场景
out_trade_noString(28)商户订单号
eft_trade_noString(28)依付得订单号
eftpay_trade_noString(28)依付得订单号
total_feeString(8)金额
currencyString(5)货币类型
walletString(20)钱包类型
trade_statusString(32)交易状态,见 附录2
tidString(20)商户终端号

{
	"subject": "测试subject",
	"body": "测试body",
	"user_confirm_key": "S0004152",
	"pay_scene": "TOKEN",
	"wallet": "MPGS",
	"fee_type": "HKD",
	"time": "20231010155344",
	"token_id": "{\n  \"data\" : \"jOlUJcWQObX5jyThzIM1IU……9310b7222\"\n  },\n  \"version\" : \"EC_v1\"\n}",
	"out_trade_no": "20231010155344000000",
	"payType": "Mpgs",
	"transaction_amount": "1.00",
	"service": "service.mpgs.token.ApplePay",
	"buyerType": "ios",
	"tid": "123",
	"sign": "a02c23990336ca547d1f9……ec2b068f77499641bd84b3fa"
}

支付成功

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "328307172405",
	"transaction_id": "328307172405",
	"gmt_payment": "2023-10-10 15:53:49",
	"trade_type": "SALE",
	"out_trade_no": "20231010155344000000",
	"eft_trade_no": "8520000212700003682237ecgjtb181",
	"eftpay_trade_no": "8520000212700003682237ecgjtb181",
	"total_fee": "1.00",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_SUCCESS",
	"tid": "123",
	"time": "20231010155349",
	"return_status": "00",
	"return_char": "",
	"sign": "9dafe3af7a0686617787922b269b27953210349abf74464706798cb862b1e9b5"
}

支付失败

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "",
	"transaction_id": "",
	"gmt_payment": "",
	"trade_type": "SALE",
	"out_trade_no": "20231009153828",
	"eft_trade_no": "8520000212700003682237e2uvki934",
	"eftpay_trade_no": "8520000212700003682237e2uvki934",
	"total_fee": "0.34",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_CLOSED",
	"tid": "123",
	"time": "20231009153832",
	"return_status": "00",
	"return_char": "",
	"sign": "cd6724a06db8d90a94875eef70610c4b0c86b468cb5ff14af9e474a857095a64"
}

查询、通知和退款