各位好,在帮一位客户接永丰银行的 API,他的文件完全没有 sample code 范例
而且居然也没有技术支援客服.....目前卡在最后一关
将讯息内文以 AES CBC 方式加密,加密后的 Byte 以十六进制2位数字串相加。
$data
{"ShopNo":"BA0026_001","OrderNo":"A201804270001","Amount":50000,"CurrencyID":"TWD",
"PayType":"A","ATMParam":{"ExpireDate":"20180502"},"CardParam":{},
"PrdtName":"虚拟帐号订单","ReturnURL":"http://10.11.22.113:8803/QPay.ApiClient/Store/Return",
"BackendURL":"http://10.11.22.113:8803/QPay.ApiClient/AutoPush/PushSuccess"}
$key
17D8E6558DC60E702A6B57E1B9B7060D
$iv
CB6FA68E42B655AB
会变成
2C236A4E91DB2F7670E79BBCE3A626EB728916919012681FF92BE0B4BBF57
F5519AF1A469A1D8710B202CB2C2F3C12A770788D825AD0F0A22AED5185
45A0D244AD0F9C37C7C693EFFABE78B606BCDAED6284902F7F522BBA85D
9BE7EFEF46C6793FB6A5D6624C2642A74EB312034BEA931EE3A5F3C660F3A
BAA9032949AE86DEFEB452545807561D282C7B7C8E9102CED1404B8B542B
C09CE12FA38F335BE7F027AE74BDDBADDB1790B172EFBF1FD25524E2BB64
A626EA44643D4BD490E348E926BB7A48D5FA939EEC5BE681009E7AC7FED1
C8475B715891321406960675B5A216032CF8657A3CB2B2D0C7FF85027D70
E1F2B5DD414373912E97FA6FB85E9AB89B118BC545583CC9AC503F8BAD73
C185CB97B28313618021F9217A30278043EF728BB5C49D231C4A22279864
F68194254BC624789F36CCDEE75861CFC667CD8E9E89F1DB04ABA0D26FEF
24BFE0470488
小弟非科班,byte 那些东西真的不熟,一般接到的使用 openssl 加密大多也只要用 base64 去编码
第一次碰到这种真的头痛,希望各位可以指点一下迷津,感激不尽
※ 编辑: chan15 (122.116.234.173 台湾), 07/25/2020 22:29:15