Reputation: 1406
Am using PayPal SDK
. Everything seems to be OK, but after I login successfully I get an error. Its difficult to figure out as there are no logs. Its just a message saying "unexpected error".
Any help is highly appreciated. Refer the code and screen shot below.
PayPalPayment newPayment = new PayPalPayment();
newPayment.setSubtotal(new BigDecimal("0.99"));
newPayment.setCurrencyType("USD");
newPayment.setRecipient("[email protected]");
newPayment.setMerchantName("xxxxx");
newPayment.setPaymentType(PayPal.PAYMENT_TYPE_PERSONAL);
newPayment.setCustomID("8873482296");
newPayment.setMemo("Hi! I'm making a memo for a simple payment.");
Intent paypalIntent = PayPal.getInstance().checkout(newPayment, MainActivity.this.getApplicationContext());
this.startActivityForResult(paypalIntent, 1);
Upvotes: 1
Views: 272
Reputation: 4857
Many be you are using , invalid email , which is not registered as a valid paypal account . So if you are testing in the sandbox account then you can use this account : [email protected]
newPayment.setSubtotal(new BigDecimal(1));
newPayment.setCurrencyType("USD");
newPayment.setRecipient("[email protected]");
Upvotes: 1