我正在尝试使用此代码为 android 添加一个 pay-pal 按钮,但它给出了错误。我认为错误是因为此代码适用于 Iphone 而我将它用于 android。是否有人有 android paypal 按钮的代码。代码如下
var PayPal = require('ti.paypal');
var paypalButton = Titanium.Paypal.createPaypalButton({
appId:"APP-XXXXXXXXXXX",
width:100,
height:30,
buttonStyle:Titanium.Paypal.BUTTON_68x24,
paypalEnvironment:Titanium.Paypal.PAYPAL_ENV_SANDBOX,
feePaidByReceiver:false,
transactionType:Titanium.Paypal.PAYMENT_TYPE_SERVICE,
enableShipping:true,
payment:
{
amount: 15.00,
tax: 0.00,
shipping: 5.00,
currency: "GBP",
recipient: "test@mail.com",
itemDescription: "Test",
senderEmailOrPhone:'test@mail'
//merchantName: Titanium.App.Properties.getString('storeName')
}
});
我在 tiapp.xml 中添加了这个
<module platform="android" version="2.2.1">ti.paypal</module>