protected int getReadyStringID() {
   return mPaymentContext instanceof RegularPaymentContext
       ? R.string.reader_state_ready_swipeonly
       : PaymentController.getInstance().getReaderType().isMultiInputSupported()
           ? R.string.reader_state_ready_multiinput
           : R.string.reader_state_ready;
 }
 protected void action() {
   try {
     PaymentController.getInstance().startPayment(getContext(), mPaymentContext);
   } catch (PaymentException e) {
     onError(null, e.getMessage());
   }
 }
  private void init() {
    getWindow().requestFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.dialog_payment);
    getWindow().getAttributes().gravity = Gravity.CENTER_VERTICAL;

    lblState = (TextView) findViewById(R.id.payment_dlg_lbl_state);
    imgSpinner = (ImageView) findViewById(R.id.payment_dlg_spinner);

    spinRotation =
        new RotateAnimation(
            0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    spinRotation.setDuration(1200);
    spinRotation.setInterpolator(new LinearInterpolator());
    spinRotation.setRepeatMode(Animation.RESTART);
    spinRotation.setRepeatCount(Animation.INFINITE);

    PaymentController.getInstance().setPaymentControllerListener(this);
    PaymentController.getInstance().enable();
  }
 @Override
 public void dismiss() {
   PaymentController.getInstance().disable();
   stopProgress();
   super.dismiss();
 }