问题描述:

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

相关阅读:
Top