| java.lang.Object | |
| ↳ | com.paymill.android.service.PMManager | 
This class is the main entry point for all SDK calls.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Adds a strong reference of the specified listener to the SDK. | |||||||||||
| Checks whether payments are available on the Safe Store. | |||||||||||
| Consume the given preauthorization. | |||||||||||
| Consume the given preauthorization. | |||||||||||
| Consume the given transaction. | |||||||||||
| Consume the given transaction. | |||||||||||
| Deletes a payment from the Safe Store secured with the password provided. | |||||||||||
| Deletes a payment from the Safe Store secured with the password provided. | |||||||||||
| Creates a new token. | |||||||||||
| Creates a new token. | |||||||||||
| This is the preferred way to use the SDK. | |||||||||||
| This is the preferred way to use the SDK. | |||||||||||
| Returns the current device id. | |||||||||||
| The currently configured
  PMService.NotificationBuilder. | |||||||||||
| Create new device id. | |||||||||||
| Lists all preauthorizations for the configured deviceId. | |||||||||||
| Lists not consumed transactions. | |||||||||||
| Get a specific preauthorization. | |||||||||||
| Get a specific transaction. | |||||||||||
| Returns the SDK Version. | |||||||||||
| Initialize the SDK. | |||||||||||
| Status of foreground mode of the PMService | |||||||||||
| Status of the SDK | |||||||||||
| Lists payments available on the Safe Store. | |||||||||||
| Lists all preauthorizations for the configured deviceId. | |||||||||||
| Lists all transactions for the configured deviceId. | |||||||||||
| Creates a new  Preauthorization. | |||||||||||
| Creates a new  Preauthorization. | |||||||||||
| Creates a new  Preauthorization. | |||||||||||
| Creates a new  Preauthorization. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Remove the specified listener from the SDK. | |||||||||||
| Reset payments and password on the Safe Store. | |||||||||||
| Saves a payment to the Safe Store secured with the password provided. | |||||||||||
| Sets the specified object as background listener. | |||||||||||
| Configures the  PMServiceto run in
 background. | |||||||||||
| Configures the
  PMService.NotificationBuilder. | |||||||||||
| Creates a new  Transaction. | |||||||||||
| Creates a new  Transaction. | |||||||||||
| Creates a new  Transaction. | |||||||||||
| Creates a new  Transaction. | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  java.lang.Object | |||||||||||
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Adds a strong reference of the specified listener to the SDK. Always remove the listener in onDestroy() of your UI elements.
| listener | the listener. | 
|---|
Checks whether payments are available on the Safe Store. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Consume the given preauthorization. After successful consumption, the
 preauthorization will no longer appear in the list of not consumed.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| preauthorization | the preauthorization | 
|---|
| IllegalArgumentException | if the context or the preauthorization is null or the manifest file is not configured correctly. | 
|---|
Consume the given preauthorization. After successful consumption, the
 preauthorization will no longer appear in the list of not consumed.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|---|
| preauthorizationId | the id of the preauthorization. | 
| IllegalArgumentException | if the context is null or the preauthorizationId is null or the manifest file is not configured correctly. | 
|---|
Consume the given transaction. After successful consumption, the
 transaction will no longer appear in the list of not consumed.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|---|
| transaction | the transaction. | 
| IllegalArgumentException | if the context or the transaction is null or the manifest file is not configured correctly. | 
|---|
Consume the given transaction. After successful consumption, the
 transaction will no longer appear in the list of not consumed.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|---|
| transactionId | the id of the transaction. | 
| IllegalArgumentException | if the context is null or the transactionId is null or the manifest file is not configured correctly. | 
|---|
Deletes a payment from the Safe Store secured with the password provided. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|---|
| paymentId | a paymentId of the object which is to be deleted. | 
| password | The password securing the payments. | 
| IllegalArgumentException | if the context is null or the paymentId is null or the password is null or the manifest file is not configured correctly. | 
|---|
Deletes a payment from the Safe Store secured with the password provided. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|---|
| payment | a payment object which is to be deleted. | 
| password | The password securing the payments. | 
| IllegalArgumentException | if the context is null or the payment is null or the password is null or the manifest file is not configured correctly. | 
|---|
Creates a new token.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
 
Learn more about tokens in the PayMill documentation.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| params | created with the PMFactory. May be null. | 
| IllegalArgumentException | if the context is null or the mode is null or the manifest file is not configured correctly. | 
|---|
Creates a new token.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
 
Learn more about tokens in the PayMill documentation.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
This is the preferred way to use the SDK.
 Generate a token using this method and use it in your backend to process
 transactions, preauthorizations or any other future available trough the
 PayMill API.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
 
Learn more about tokens in the PayMill documentation.
Note: This method does not require an init and you don't need to have your account enabled for mobile.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| mode | LIVE or TEST mode. | 
| merchantPublicKey | your PayMill public key for LIVE or TEST mode, depending on the previous parameter. | 
| IllegalArgumentException | if the context is null or the method is null or the merchantPublicKey is null or the mode is null or the manifest file is not configured correctly. | 
|---|
This is the preferred way to use the SDK.
 Generate a token using this method and use it in your backend to process
 transactions, preauthorizations or any other future available trough the
 PayMill API.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
 
Learn more about tokens in the PayMill documentation.
Note: This method does not require an init and you don't need to have your account enabled for mobile.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| params | created with the PMFactory. May be null. | 
| mode | LIVE or TEST mode. | 
| merchantPublicKey | your PayMill public key for LIVE or TEST mode, depending on the previous parameter. | 
| IllegalArgumentException | if the context is null or the method is null or the merchantPublicKey is null or the mode is null or the manifest file is not configured correctly. | 
|---|
Returns the current device id.
The currently configured
 PMService.NotificationBuilder.
PMService.NotificationBuilder
         or null if none has been configured.
Create new device id.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Lists all preauthorizations for the configured deviceId.
 You should first add
 a foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Lists not consumed transactions.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Get a specific preauthorization.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| preauthorizationId | the id of the preauthorization. | 
|---|
| IllegalArgumentException | if the context is null or the preauthorizationId is null or the manifest file is not configured correctly. | 
|---|
Get a specific transaction.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|---|
| transactionId | the id of the transaction. | 
| IllegalArgumentException | if the context is null or the transactionId is null or the manifest file is not configured correctly. | 
|---|
Initialize the SDK. This should always be the first call you make, when
 you use the SDK. You should first add a foreground listener to receive a callback on the UI thread.
 
 
Note: If a background listener is set, it will receive the list of not consumed preauthorizations and transactions.
| mode | LIVE or TEST mode. | 
|---|---|
| merchantPublicKey | your PayMill public key for LIVE or TEST mode, depending on the previous parameter. | 
| backgroundListener | an optional background listener. | 
| deviceId | an optional deviceID. Note: You cannot specify an arbitrary string. The device ID must have been generated by the SDK, for example with getNewDeviceId(Context). You can use this
            parameter to associate end users in your applications with SDK
            deviceIDs.If you don't specify a device ID, the SDK will
            generate one and save it for later use. | 
| IllegalArgumentException | if the context is null or the merchantPublicKey is null or the mode is null the manifest file is not configured correctly. | 
|---|
Status of foreground mode of the PMService
Status of the SDK
Lists payments available on the Safe Store. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|---|
| password | The password securing the payments. | 
| IllegalArgumentException | if the context is null or the password is null or the manifest file is not configured correctly. | 
|---|
Lists all preauthorizations for the configured deviceId.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Lists all transactions for the configured deviceId.
 You should first add a
 foreground listener to receive a callback on the UI thread or a set a
 background listener to receive a callback on a separate Thread.
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null. | 
|---|
Creates a new Preauthorization.
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the preauthorization will
 never appears in the list of not consumed preauthorizations.
| context | the application context. | 
|---|---|
| token | a previously generated token. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the preauthorization later, false otherwise. | 
| IllegalArgumentException | if the context is null or the token is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Preauthorization. 
 This is a convenience method, which generates a token in the background 
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the preauthorization will
 never appears in the list of not consumed preauthorizations.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the preauthorization later, false otherwise. | 
| IllegalArgumentException | if the context is null or the method is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Preauthorization.
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the preauthorization will
 never appears in the list of not consumed preauthorizations.
| context | the application context. | 
|---|---|
| paymentId | the id of a previously created payment. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the preauthorization later, false otherwise. | 
| IllegalArgumentException | if the context is null or the paymentId is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Preauthorization.
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the preauthorization will
 never appears in the list of not consumed preauthorizations.
| context | the application context. | 
|---|---|
| payment | a previously created payment. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the preauthorization later, false otherwise. | 
| IllegalArgumentException | if the context is null or the payment is null or parameters are null or the manifest file is not configured correctly. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Remove the specified listener from the SDK.
| listener | the listener. | 
|---|
Reset payments and password on the Safe Store. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|
| IllegalArgumentException | if the context is null or the manifest file is not configured correctly. | 
|---|
Saves a payment to the Safe Store secured with the password provided. 
 You should first add a
 foreground listener to receive a callback on the UI thread or set a
 background listener to receive a callback on a separate Thread.
 
| context | the application context. | 
|---|---|
| payment | a payment object which is to be saved. | 
| password | The password securing the payments - cannot be null or missing. | 
| IllegalArgumentException | if the context is null or the payment is null or the password is null or the manifest file is not configured correctly. | 
|---|
Sets the specified object as background listener. This listener will receive all SDK callbacks on a separate thread, which is protected by the PMService (which always runs in foreground mode).
Configures the PMService to run in
 background. Note, the default setting is true.
| foregroundEnabled | true if you want the service to run in foreground mode, false otherwise | 
|---|
Configures the
 PMService.NotificationBuilder.
 Note: This will have no effect if the service is not configured to
 run in foreground mode.
| foregroundNotificationBuilder | a notification builder or null if you want to use the default one. | 
|---|
Creates a new Transaction. 
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the transaction will never
 appears in the list of not
 consumed transactions.
| context | the application context. | 
|---|---|
| token | a previously generated token. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the transaction later, false otherwise. | 
| IllegalArgumentException | if the context is null or the token is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Transaction. 
 This is a convenience method, which generates a token in the background 
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the transaction will never
 appears in the list of not
 consumed transactions.
| context | the application context. | 
|---|---|
| method | created with the PMFactory. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the transaction later, false otherwise. | 
| IllegalArgumentException | if the context is null or the method is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Transaction. 
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the transaction will never
 appears in the list of not
 consumed transactions.
| context | the application context. | 
|---|---|
| payment | a previously created payment. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the transaction later, false otherwise. | 
| IllegalArgumentException | if the context is null or the payment is null or the parameters are null or the manifest file is not configured correctly. | 
|---|
Creates a new Transaction. 
 You should first add a foreground
 listener to receive a callback on the UI thread or a set a background
 listener to receive a callback on a separate Thread.
 
 Note: If you set consumable to false, the transaction will never
 appears in the list of not
 consumed transactions.
| context | the application context. | 
|---|---|
| paymentId | the id of a previously created payment. | 
| parameters | created with the PMFactory. | 
| consumable | true if you want to consume the transaction later, false otherwise. | 
| IllegalArgumentException | if the context is null or the paymentId is null or the parameters are null or the manifest file is not configured correctly. | 
|---|