我试图使用paypal-cordova-plugin将piement集成到我的移动应用上。但我正在遵循的说明是要求沙箱ID和生产ID,但我不知道在Paypal中哪里可以找到它们。有人可以帮我吗?
这是他们被问到的地方
angular.module('app')
.constant("shopSettings", (function () {
return {
payPalSandboxId: "Aar8HZzvc5NztVWodTBpOiOod9wWrBDrJUjyvRr4WsxcCD28xYig7oecfYsqxQUDu5QHptPpSALirxZD",
payPalProductionId : "production id here",
payPalEnv: "PayPalEnvironmentSandbo", // for testing production for production
payPalShopName : "SenPass",
payPalMerchantPrivacyPolicyURL : "url to policy",
payPalMerchantUserAgreementURL : "url to user agreement"
}
})());

这是我关注的链接:http://ionicandroidlearning.blogspot.fr/2015/11/ionic-paypal-integration.html
答案 0 :(得分:2)
var configuration=function () {
var configOptions = {
merchantName: "Some name you have specified",
merchantPrivacyPolicyURL: "http://yourserver/privacypolicy",
merchantUserAgreementURL: "http://yourserver/agreement",
languageOrLocale: "en_US"
};
// for more options see paypal-mobile-js-helper.js
var _config = new PayPalConfiguration( configOptions );
return _config;
}
var onPrepareRender = function(){
$log.info(" ======= onPrepareRender ==========");
}
var onPayPalMobileInit = function(){
var payPalConfig = configuration();
PayPalMobile.prepareToRender("PayPalEnvironmentSandbox", payPalConfig, onPrepareRender);
deferred.resolve( payPalConfig );
}
var clientIDs = {
"PayPalEnvironmentProduction": '', //leave it blank
"PayPalEnvironmentSandbox": 'your sandbox id'
};
PayPalMobile.init(clientIDs, onPayPalMobileInit);

答案 1 :(得分:0)
要检索PayPal Sandobx密钥,请尝试转到此处:
https://developer.paypal.com/developer/accounts/
点击您生成的帐户进行测试(在表格中),然后点击个人资料...它打开一个带有一些标签的模态..选择API Credential tab
希望它可以帮到你