当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Unexpected Error when paying with PayPal

问题描述:

Im trying to set a paypal payment in my app, but it doesnt seem to work:

Ive already got my app approved, and got a live API key, but this happens when Im trying to log into some paypal account (it isnt mine because you cant pay yourself):

The Logcat doesnt show anything useful. It acts as if nothing happned.

my code:

 PayPal ppObj;

CheckoutButton launchSimplePayment;

public void pay(View v) {

PayPalPayment newPayment = new PayPalPayment();

newPayment.setSubtotal(new BigDecimal("10.00"));

newPayment.setCurrencyType("USD");

newPayment.setRecipient("[email protected]");

newPayment.setMerchantName("name");

Intent paypalIntent = PayPal.getInstance().checkout(newPayment, this);

this.startActivityForResult(paypalIntent, 1);

}

inside OnCreate:

ppObj = PayPal.initWithAppID(this, "**APP-LIVE-API-KEY**", PayPal.ENV_LIVE);

android:onClick="pay" calls to pay from the layout file. I dont use a special paypal button.

Thanks for your help!

网友答案:

Paypal state that should have premiere or business account

分享给朋友:
您可能感兴趣的文章:
随机阅读: