/**
   * Constructor.
   *
   * @param payment
   * @param transactionId
   * @param transactionType
   * @throws Exception
   */
  public CreditCardTransactionData(MPayment payment, String transactionId, String transactionType)
      throws Exception {
    this.amount = payment.getPayAmt();
    this.currency = payment.getC_Currency().getISO_Code();
    String expMonth =
        payment.getCreditCardExpMM() < 10
            ? ("0" + payment.getCreditCardExpMM())
            : ("" + payment.getCreditCardExpMM());
    int expYear =
        payment.getCreditCardExpYY() < 1000
            ? (payment.getCreditCardExpYY() + 2000)
            : payment.getCreditCardExpYY();
    this.ccExpiry = expYear + expMonth;
    this.ccValidationNumber = payment.getCreditCardVV();
    this.ccNumber = payment.getCreditCardNumber();
    if (this.ccNumber != null) {
      this.ccNumber = this.ccNumber.replaceAll("\\D", "");
    }
    this.bankCode = payment.getRoutingNo();
    this.customerId = payment.getC_BPartner_ID() + "";
    I_C_BPartner bp = payment.getC_BPartner();
    if (bp != null) {
      this.customerId = bp.getValue();
    }

    this.transactionId = transactionId;
    this.transactionType = transactionType;
    this.authToken = payment.getR_AuthCode();
    this.reversalSequenceNo = payment.getOrig_TrxID();
  }
 @Override
 public Object[] apply(final I_C_Order document) {
   final I_C_BPartner bpartner = document.getC_BPartner();
   final String bpValue = bpartner.getValue();
   final String bpName = bpartner.getName();
   return new Object[] {TableRecordReference.of(document), bpValue, bpName};
 }
  public Vector<Vector<Object>> getStudentData(MCAHolder holder) {
    Vector<Vector<Object>> data = new Vector<Vector<Object>>();

    for (MCAHolderRelation relation : holder.getHolderRelations()) {
      I_C_BPartner bpartner = relation.getC_BPartner();

      Vector<Object> line = new Vector<Object>();
      line.add(true);
      line.add(bpartner.getValue());
      line.add(bpartner.getName());
      line.add("0000"); // replace by SecureCode
      line.add("0000"); // replace by Enrollment
      line.add("0000"); // replace by Transport Code
      line.add(relation.getChildNo());
      data.add(line);
      studentList.put(bpartner.getValue(), bpartner);
      findPaymentSchedule(bpartner);
    }
    return data;
  }