signContract
The Mobile Payment Provider (MPP) app calls the signContract API to start the user authorization process for Auto Debit payments.
Method signature
copy
public class AlipayPlusClientAutoDebit{
void signContract(SignContractParams params, Callback<SignContractResult> callback);
}
Request parameters
Item | Type | Description | Required |
params | Parameters that are required to initiate a contract. | M | |
callback | Callback | The callback to be invoked after the signing process ends. See Callback for details. | M |
Callback
Item | Type | Description | Required |
result | The result information that is required if the signing is successful. | O | |
errorCode | String | The error code that is required if the signing fails. | O |
errorMessage | String | The error message that is required if the signing fails. | O |
Response parameters
N/A
Sample
copy
SignContractParams params = new SignContractParams;
Intent intent = getIntent();
Uri data = intent.getData();
params.needCallback = data.getBooleanQueryParameter("needCallback", false);
params.authUrl = data.toString();
AlipayPlusClientAutoDebit.getInstance().signContract(this, params, new Callback<SignContractResult>() {
@Override
public void onSuccess(SignContractResult result) {
}
@Override
public void onFailure(String errorCode, String errorMessage) {
}
});