xcode 我们可以在模拟器中测试Apple pay吗
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33967327/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can we test Apple pay in simulator
提问by Gopal Devra
I know that Apple pay testing we use Apple pay stubs in iOS 8, but please let me know how to use Apple pay without ApplePayStubs in iOS 9 in simulator.
我知道 Apple pay 测试我们在 iOS 8 中使用 Apple pay stubs,但请让我知道如何在 iOS 9 中在模拟器中使用 Apple pay 而没有 ApplePayStubs。
Thanks in advance
提前致谢
采纳答案by Gopal Devra
Yes it is working in Simulator with Xcode 7 and iOS 9.
是的,它在 Xcode 7 和 iOS 9 的模拟器中工作。
No need for bio metric thumb scanning.
无需生物识别拇指扫描。
Thanks all
谢谢大家
回答by hmlasnk
Yes. You can test apple pay using iOS 9 simulator. So you don't need to add any testing sheet instead PKPaymentAuthorizationViewController. It's working on iOS 9 simulator. Make sure your app run on iPhone 6, iPhone 6 plus or latest version of simulator.
是的。您可以使用 iOS 9 模拟器测试 apple pay。所以你不需要添加任何测试表而不是 PKPaymentAuthorizationViewController。它正在 iOS 9 模拟器上运行。确保您的应用程序在 iPhone 6、iPhone 6 plus 或最新版本的模拟器上运行。
回答by Ryan
official documentation: https://developer.apple.com/library/archive/ApplePay_Guide/Authorization.html
官方文档:https: //developer.apple.com/library/archive/ApplePay_Guide/Authorization.html
NOTE
In Xcode 7.0 or later, you can test the payment authorization view controller in the simulator. It provides simulated cards for all the supported payment networks and returns dummy payment data in plain text. On a device, this data is encrypted with your merchant identifier and must be decrypted either on your server or by your payment processor.
Use the Apple Pay Sandbox environment to test your app on a device with test cards.
Although these techniques provide fast and convenient ways to test your code, you still need to thoroughly test Apple Pay on actual, physical devices with production cards.
笔记
在 Xcode 7.0 或更高版本中,您可以在模拟器中测试支付授权视图控制器。它为所有支持的支付网络提供模拟卡,并以纯文本形式返回虚拟支付数据。在设备上,此数据使用您的商家标识符进行加密,并且必须在您的服务器上或由您的支付处理器解密。
使用 Apple Pay Sandbox 环境在带有测试卡的设备上测试您的应用程序。
尽管这些技术提供了快速方便的方法来测试您的代码,但您仍然需要在带有生产卡的实际物理设备上彻底测试 Apple Pay。