processSource

fun processSource(sourceJson: JSONObject, fromActivity: Activity, resultListener: ElepayResultListener): Boolean

Process the source request.

This is a Java compatible version.

Return

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

Parameters

sourceJson

A JSON object that contains the source data.

fromActivity

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

resultListener

The result handler


fun processSource(sourceString: String, fromActivity: Activity, resultListener: ElepayResultListener): Boolean

Process the source 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 passed the data to the processor.

Parameters

sourceString

The raw string value of the source JSON object.

fromActivity

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

resultListener

The result handler


fun processSource(sourceString: String, fromActivity: Activity, resultHandler: (ElepayResult) -> Unit): Boolean

Process the source request.

Return

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

Parameters

sourceString

The raw string value of the source data JSON.

fromActivity

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

resultHandler

The result handler


fun processSource(sourceJson: 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

sourceJson

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