initialize method

dynamic initialize(
  1. BuildContext context
)

Implementation

initialize(BuildContext context){

  ExpresspaySdk.instance.ADAPTER.CARD_PAY.execute(
      order: _order!,
      payer: _payer!,
      callback: CardPayResponseCallback(
          success: (ExpresspayTransactionDetailsSuccess response){
            Log(response.toJson().toString());
            _onTransactionSuccess!(response);
          },
          failure: (ExpresspayTransactionDetailsSuccess response){
            Log(response.toJson().toString());
            _onTransactionFailure!(response);
          },
          error: (ExpresspayError error){
            _onError!(error);
          }
      ),
      onFailure: (err){

      }
  );
  Future.delayed(const Duration(milliseconds: 200)).then((value) {
    if(_onPresent != null) {
      _onPresent!(context);
    }
  });
}