Class TransactionManager

java.lang.Object
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<B>
ru.bitel.bgbilling.server.bean.AbstractTransactionManager<Transaction>
ru.bitel.bgbilling.modules.tinkoff.server.bean.TransactionManager
All Implemented Interfaces:
AutoCloseable

public class TransactionManager extends AbstractTransactionManager<Transaction>
  • Constructor Details

    • TransactionManager

      public TransactionManager(Connection con, int moduleId)
  • Method Details

    • getFromRS

      protected Transaction getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException
      Specified by:
      getFromRS in class ru.bitel.common.dao.AbstractDao<Transaction>
      Throws:
      SQLException
      ru.bitel.bgbilling.common.BGException
    • getImpl

      protected Transaction getImpl(int transactionId) throws ru.bitel.bgbilling.common.BGException, SQLException
      Overrides:
      getImpl in class ru.bitel.common.dao.AbstractDao<Transaction>
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • update

      public boolean update(Transaction transaction, TransactionStatus newTransactionStatus) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateImpl

      protected void updateImpl(Transaction transaction) throws ru.bitel.bgbilling.common.BGException
      Specified by:
      updateImpl in class ru.bitel.common.dao.AbstractDao<Transaction>
      Throws:
      ru.bitel.bgbilling.common.BGException
    • doResend

      public void doResend() throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • doCheckRequest

      public void doCheckRequest(int contractId, boolean autopaymentTransaction) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • check

      public boolean check(Transaction transaction, org.json.JSONObject resultJsonObject) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • registerOrder

      public Transaction registerOrder(int contractId, String contractTitle, String customerAddress, BigDecimal sum, Map<String,Object> dataMap, boolean autopaymentTransaction, boolean requestBindingId, BGTransactionType transactionType, String paymentPhone) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • registerOrder

      public Transaction registerOrder(int contractId, String contractTitle, String customerAddress, BigDecimal sum, Map<String,Object> dataMap, boolean autopaymentTransaction, boolean requestBindingId, String returnUrl, BGTransactionType transactionType, String paymentPhone) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • doCancelTransaction

      public void doCancelTransaction(int transactionId) throws ru.bitel.bgbilling.common.BGException
      { "TerminalKey" :" TinkoffBankTest", "PaymentId" : "2164657", "Token" : "328a1ed43e3800c142b298fbb01772c739c524dd455717c8a9152428037439fb" }
      Parameters:
      transactionId -
      Throws:
      ru.bitel.bgbilling.common.BGException
    • doCharge

      public void doCharge(Transaction transaction, Autopayment autopayment) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • addTransactionPayment

      public void addTransactionPayment(Transaction transaction, String transactionParameters) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • addTransactionParameters

      public static void addTransactionParameters(Transaction transaction, String params)
    • setConnectionTimeout

      protected void setConnectionTimeout(HttpsURLConnection connection)
      Overrides:
      setConnectionTimeout in class AbstractTransactionManager<Transaction>
    • getToken

      public String getToken(org.json.JSONObject requestJsonObject, String password)