各位好,在幫一位客戶接永豐銀行的 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