Developer's Guide
18 July 2011 PayPal Mobile Payments Developer Guide and Reference – Android OS Edition
The interface for providing details on when a payment is completed is defined in
com.paypal.android.MEP.PayPalResultDelegate. This interface provides you with a way to be
notified immediately when a payment has completed:
public interface PayPalResultDelegate{
void onPaymentSucceeded(String payKey, String paymentStatus);
void onPaymentFailed(String paymentStatus, String correlationID,
String payKey, String errorID, String errorMessage);
void onPaymentCanceled(String paymentStatus);
}
PayPal recommends that you implement this interface to be immediately informed upon the
completion of a payment, rather than waiting to receive the transaction details upon the
completion of the PayPal MPL Activity.
After the Payment
After the payment is completed, the Mobile Payments Library will return the payKey. There are
also a number of other features available to you to further deal with the payment: Instant Payment
Notification, Transaction Details, and Refunds.
Instant Payment Notification
Instant Payment Notification (IPN) is PayPal‟s message service that sends a notification when a
transaction is affected. You can integrate IPN with your systems to automate and manage your
back office. More details and documentation are available at: www.paypal.com/ipn
Transaction Details
You can integrate with the PayPal PaymentDetails API to retrieve details on a payment based on
the payKey. More details and documentation are available at:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf
Refunds
Refunds can be supported by manual refund via the PayPal account interface or via the Refund
API. More details and documentation are available at:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf