public interface PaymentListener
Provides callback methods for getting responses, updates and final payment
results initiated through the BillingManager
class .
Method Summary | |
---|---|
void |
onCancelled()
Called when a user has cancelled the billing process from one of the dialogs shown by the billing manager. |
void |
onFailure(java.lang.String failureDetails)
Called when the payment transaction has failed. |
void |
onPaymentStateChanged(java.lang.String paymentState)
Called each time we have moved to a new state in the payment process. |
void |
onProductSelected(com.txtnation.android.products.Product product)
Called when a product (price) has been selected from the list of products returned from server. |
void |
onProductsReceived(java.util.List<com.txtnation.android.products.Product> products)
Called when we have received the list products (prices) from the server that we can display on the product selection screen. |
void |
onSuccess()
Called if the payment has been processed successfully and user's mobile account has been charged. |
Method Detail |
---|
void onProductsReceived(java.util.List<com.txtnation.android.products.Product> products)
products
- an List of products returned from server so that user can
select one of them.void onProductSelected(com.txtnation.android.products.Product product)
products
- the selected productvoid onCancelled()
void onFailure(java.lang.String failureDetails)
BillingManager#FailureTypes
. String
of these enums will be passed this method.
failure
- The type of failure we have encountered.void onSuccess()
void onPaymentStateChanged(java.lang.String paymentState)
state
- The current Payment State of the current transaction