processPayment

fun processPayment(chargeData: JSONObject, fromActivity: Activity, resultListener: ElepayResultListener): Boolean

Process the payment request.

This is a Java compatible version.

Return

true for successfully parsed the payment data and handled the data to the processor.

Parameters

chargeData

A JSON object that contains the payment data, data structure may be different from payment methods.

fromActivity

An Activity instance used to redirect to show payment processing UI.

resultListener

The result handler


fun processPayment(chargeDataString: String, fromActivity: Activity, resultListener: ElepayResultListener): Boolean

Process the payment request.

Note: This method is supposed to be used when your project could neither use Kotlin nor support Java 8 lambda expression. If your project is based on Kotlin or can uses Java 8 lambda expressions, consider using the API that takes a ElepayResultHandler callback.

Return

true for successfully parsed the payment data and handled the data to the processor.

Parameters

chargeDataString

The raw string value of the charge data JSON object that contains the payment data.

fromActivity

An Activity instance used to redirect to show payment processing UI.

resultListener

The result handler


fun processPayment(chargeDataString: String, fromActivity: Activity, resultHandler: (ElepayResult) -> Unit): Boolean

Process the payment request.

Return

true for successfully parsed the payment data and passed the data to the processor.

Parameters

chargeDataString

The raw string value of the charge data JSON object that contains the payment data.

fromActivity

An Activity instance used to redirect to show payment processing UI.

resultHandler

The result handler


fun processPayment(chargeData: JSONObject, fromActivity: Activity, resultHandler: (ElepayResult) -> Unit): Boolean

Process the payment request.

Return

true for successfully parsed the payment data and passed the data to the processor.

Parameters

chargeData

A JSON object that contains the payment data, data structure may be different from payment methods.

fromActivity

An Activity instance used to redirect to show payment processing UI.

resultHandler

The result handler