Interface BaseDropInServiceContract
-
- All Implemented Interfaces:
public interface BaseDropInServiceContract
-
-
Method Summary
Modifier and Type Method Description UnitonRemoveStoredPaymentMethod(StoredPaymentMethod storedPaymentMethod)Only applicable to removing stored payment methods. abstract UnitsendResult(DropInServiceResult result)Allows sending the result of the /payments and /payments/details network calls. abstract UnitsendBalanceResult(BalanceDropInServiceResult result)Allows sending the result of the /paymentMethods/balance network call. abstract UnitsendOrderResult(OrderDropInServiceResult result)Allows sending the result of the /orders network call. abstract UnitsendRecurringResult(RecurringDropInServiceResult result)Allows sending the result of the DELETE /storedPaymentMethods network call. abstract UnitsendAddressLookupResult(AddressLookupDropInServiceResult result)Allows sending the result of Address Lookup operations. abstract BundlegetAdditionalData()Gets the additional data that was set when starting Drop-in using DropInConfiguration.Builder.setAdditionalDataForDropInService or null if nothing was set. UnitonRedirect()Set a callback that will be called when a redirect is made. UnitonBinValue(String binValue)Set a callback that will be called when the bin value changes. UnitonBinLookup(List<BinLookupData> data)Set a callback that will be called when a bin lookup is performed. UnitonAddressLookupQueryChanged(String query)Set a callback that will be called when shopper inputs a query to perform address lookup. BooleanonAddressLookupCompletion(LookupAddress lookupAddress)Set a callback that will be called when shopper chooses an address option that requires complete details to be provided. -
-
Method Detail
-
onRemoveStoredPaymentMethod
Unit onRemoveStoredPaymentMethod(StoredPaymentMethod storedPaymentMethod)
Only applicable to removing stored payment methods. Use DropInConfiguration.Builder.setEnableRemovingStoredPaymentMethods to enable this feature.
In this method you should make the network call to tell your server to make a call to the DELETE /storedPaymentMethods endpoint. This method is called when the user initiates removing a stored payment method using the remove button.
We provide storedPaymentMethod that contains the id of the stored payment method to be removed in the field StoredPaymentMethod.id.
Asynchronous handling: since this method runs on the main thread, you should make sure the DELETE /storedPaymentMethods call and any other long running operation is made on a background thread.
Use sendRecurringResult to send the final result of this call back to the Drop-in.
Note that not overriding this method while enabling this feature will cause a MethodNotImplementedException to be thrown.
See https://docs.adyen.com/api-explorer/ for more information on the API documentation.
-
sendResult
abstract Unit sendResult(DropInServiceResult result)
Allows sending the result of the /payments and /payments/details network calls.
Call this method with a DropInServiceResult depending on the response of the corresponding network call.
Check the subclasses of DropInServiceResult for more information.
- Parameters:
result- the result of the network call.
-
sendBalanceResult
abstract Unit sendBalanceResult(BalanceDropInServiceResult result)
Allows sending the result of the /paymentMethods/balance network call.
Call this method with a BalanceDropInServiceResult depending on the response of the corresponding network call.
Check the subclasses of BalanceDropInServiceResult for more information.
- Parameters:
result- the result of the network request.
-
sendOrderResult
abstract Unit sendOrderResult(OrderDropInServiceResult result)
Allows sending the result of the /orders network call.
Call this method with a OrderDropInServiceResult depending on the response of the corresponding network call.
Check the subclasses of OrderDropInServiceResult for more information.
- Parameters:
result- the result of the network request.
-
sendRecurringResult
abstract Unit sendRecurringResult(RecurringDropInServiceResult result)
Allows sending the result of the DELETE /storedPaymentMethods network call.
Call this method with a RecurringDropInServiceResult depending on the response of the corresponding network call.
Check the subclasses of RecurringDropInServiceResult for more information.
- Parameters:
result- the result of the network call.
-
sendAddressLookupResult
abstract Unit sendAddressLookupResult(AddressLookupDropInServiceResult result)
Allows sending the result of Address Lookup operations.
Call this method with a AddressLookupDropInServiceResult depending on the performed address lookup action.
Check the subclasses of AddressLookupDropInServiceResult for more information.
- Parameters:
result- the result of the action.
-
getAdditionalData
abstract Bundle getAdditionalData()
Gets the additional data that was set when starting Drop-in using DropInConfiguration.Builder.setAdditionalDataForDropInService or null if nothing was set.
-
onRedirect
Unit onRedirect()
Set a callback that will be called when a redirect is made.
-
onBinValue
Unit onBinValue(String binValue)
Set a callback that will be called when the bin value changes.
- Parameters:
binValue- Up to the first 6 or 8 digits of the card number.
-
onBinLookup
Unit onBinLookup(List<BinLookupData> data)
Set a callback that will be called when a bin lookup is performed.
- Parameters:
data- A list of BinLookupData, which contains information about the detected brands.
-
onAddressLookupQueryChanged
Unit onAddressLookupQueryChanged(String query)
Set a callback that will be called when shopper inputs a query to perform address lookup.
- Parameters:
query- Query inputted by shopper.
-
onAddressLookupCompletion
Boolean onAddressLookupCompletion(LookupAddress lookupAddress)
Set a callback that will be called when shopper chooses an address option that requires complete details to be provided.
- Parameters:
lookupAddress- Address option selected by shopper.
-
-
-
-