Server-side Payment Token decryption for Apple Pay

我怕爱的太早我们不能终老 提交于 2019-12-09 22:42:21

问题


There are third party libraries that provide support for decrypting Apple Pay token on the server side. Is there any such .NET library?

Third-paty Libraries

Ruby library for decrypting Apple Pay payment tokens

PHP library for decrypting Apple Pay payment tokens

What we're trying to accomplish

We're using Compass XML platform for payment processing, and the goad is to decrypt the payment token on our server and then use the Compass XML for final payment processing.


回答1:


I just pushed my works into github, it uses Bouncy Castle C# library to decrypt token on the server side, and works both for Android Pay and Apple Pay, please check it out.

https://github.com/chengbo/ApplePayAndroidPayDecryption

NOTE: The token verification for Apple Pay not implement yet.




回答2:


I don't know of any .net libraries specifically, but there's a number of implementations available on GitHub that you could take a look at - here's another PHP one, for example: https://github.com/etsy/applepay-php

Payment decryption is fairly straightforward if you're familiar with crypto, and is achievable using something like OpenSSL. There's some documentation on the exact process here:

https://developer.apple.com/library/ios/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html



来源:https://stackoverflow.com/questions/37520124/server-side-payment-token-decryption-for-apple-pay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!