Package com.moneychanger.core

Examples of com.moneychanger.core.OpenTransactionAccount


        }
    }//GEN-LAST:event_jButton_VerifyFilesActionPerformed

    private void jButton_InActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_InActionPerformed
        try {
            OpenTransactionAccount otAccount = new OpenTransactionAccount();
            String basket = otAccount.showBasket(jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextField_AssetID.getText());
            if (basket != null && basket.length() > 0) {
                new ExchangeBasketDialog(null, true, basket, true, jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextField_AccountID.getText(), jTextField_AssetID.getText()).setVisible(true);
            } else {
                JOptionPane.showMessageDialog(null, "Error getting basket curreny list", "Error", JOptionPane.ERROR_MESSAGE);
            }
View Full Code Here


        }
    }//GEN-LAST:event_jButton_InActionPerformed

    private void jButton_OutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_OutActionPerformed
        try {
            OpenTransactionAccount otAccount = new OpenTransactionAccount();
            String basket = otAccount.showBasket(jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextField_AssetID.getText());
            if (basket != null && basket.length() > 0) {
                new ExchangeBasketDialog(null, true, basket, false, jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextField_AccountID.getText(), jTextField_AssetID.getText()).setVisible(true);
            } else {
                JOptionPane.showMessageDialog(null, "Error getting basket curreny list", "Error", JOptionPane.ERROR_MESSAGE);
            }
View Full Code Here

        recipientUserID="Bg2QrSTomOEU5ICfvhfYfBYxQZPktDSnaVPpMLYxUnz"*/
        if(jTextArea1.getText().trim().contains("hasRecipient=\"true\"") && !jTextArea1.getText().contains(nymID)){
            JOptionPane.showMessageDialog(this, "The recipient NYM ID in cheque and your NYM ID do no match ","Error",JOptionPane.ERROR_MESSAGE);
            return;
        }
        OpenTransactionAccount openTransaction = new OpenTransactionAccount();
        try{
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean success = openTransaction.depositCheque(serverID, nymID, accountID, jTextArea1.getText());
            /**
             * Reload the inbox and top accounts panel if success
             */
            if(success){
                JOptionPane.showMessageDialog(this, "Cheque deposited successfully","Success",JOptionPane.INFORMATION_MESSAGE);
View Full Code Here

        if (!bSure || otapiJNI.OTAPI_Basic_GetNym_TransactionNumCount(serverID, nymID) < (2+memberCount)) {
            System.out.println("IN doExchangeBasket , failed to get transaction numbers, OT_API_GetNym_TransactionNumCount:" + otapiJNI.OTAPI_Basic_GetNym_TransactionNumCount(serverID, nymID));
            return;
        }

        OpenTransactionAccount otAccount = new OpenTransactionAccount();
        String exchangeRequest = otAccount.getExchangeBasketRequest(serverID, nymID, assetID, accountID, Integer.parseInt(jTextField1.getText()));

       
        for (int i = 0; i < memberCount; i++) {
            String memberAssetID = otapiJNI.OTAPI_Basic_Basket_GetMemberType(assetID, i);

            System.out.println("In doExchangeBasket,memberAssetID:" + memberAssetID + " assetID:" + assetID + " nymID:" + nymID + " serverID:" + serverID);

            new ExchangeBasketAcctDialog(null, true, memberAssetID, serverID, nymID).setVisible(true);
            if (Helpers.isBasketXCancelled()) {
                Helpers.setBasketXCancelled(false);
                JOptionPane.showMessageDialog(null, "The basket exchange has been cancelled", "Basket Exchange Canellation", JOptionPane.INFORMATION_MESSAGE);
                return;
            }
            String memberAccountID = Helpers.getBasketXAcct();
            exchangeRequest = otapiJNI.OTAPI_Basic_AddBasketExchangeItem(serverID, nymID, exchangeRequest, memberAssetID, memberAccountID);

        }
        String xchangeType = inXchange == true ? "IN" : "OUT";
        if (!otAccount.exchangeBasket(assetID, serverID, nymID, exchangeRequest, inXchange, memberCount, accountID)) {
            JOptionPane.showMessageDialog(null, "Exchange basket failed", "Server Error", JOptionPane.ERROR_MESSAGE);
        } else {
            JOptionPane.showMessageDialog(null, xchangeType + " Exchange of basket currency done successfully", "Basket Exchange Success", JOptionPane.INFORMATION_MESSAGE);
        }
View Full Code Here

    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

    private void initValues() {

        OpenTransactionAccount otAccount = new OpenTransactionAccount();
        accountMap = otAccount.getAccounts(assetID, nymID, serverID);
        Helpers.populateComboWithoutAll(accountMap, jComboBox1);
    }
View Full Code Here

            if (invoice.equals("-") && jTextField1.getText().contains("-")) {
                JOptionPane.showMessageDialog(this, "Please enter positive amount for invoice", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }

            OpenTransactionAccount openTransactionAccount = new OpenTransactionAccount();
            String validFrom = String.valueOf(System.currentTimeMillis() / 1000);
            String validTo = String.valueOf(dateField);
            /*if(dateField.getDate().getTime()<=System.currentTimeMillis()){
            JOptionPane.showMessageDialog(null , "Expiration date should be greater than today","Date error",JOptionPane.ERROR_MESSAGE);
            return;
            }*/
            this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            String chequeString = openTransactionAccount.writeCheque(serverID, nymID, accountID, validFrom, validTo, jTextArea1.getText(), jTextField3.getText(), invoice + jTextField1.getText());
            System.out.println("chequeString:" + chequeString);
            new OTWriteChequeOutput(null, true, chequeString).setVisible(true);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
View Full Code Here

        System.out.print("On click assetID:"+assetID);
        System.out.print("On click serverID:"+serverID);
        System.out.print("On click  nymiiidL:"+nymID);
        try {
            OpenTransactionAccount openTransaction = new OpenTransactionAccount(serverID, nymID, assetID ,label);
            this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean result = openTransaction.createAccount();
            this.setCursor(Cursor.getDefaultCursor());
            if(result){
                JOptionPane.showMessageDialog(this, "Account created successfully", "Account Creation", JOptionPane.INFORMATION_MESSAGE);
                MainPage.loadAccount(assetIDMainPage, serverIDMainPage, nymIDMainPage,selectedID);
                MainPage.refreshMarketNym(serverIDMainPage);
View Full Code Here

    /** Creates new form DepositCashDialog */
    public DepositCashDialog(java.awt.Frame parent, boolean modal,String[] purseDetails,String serverID,String nymID,String accountID) {
        super(parent, modal);
        initComponents();
        openTransaction = new OpenTransactionAccount();
        this.serverID = serverID;
        this.nymID = nymID;
        this.accountID = accountID;
        this.purseDetails = purseDetails;
        initValues();
View Full Code Here

                JOptionPane.showMessageDialog(this, "Please enter valid number for amount", "Number Format Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            System.out.println("serverID:"+serverID+",nymID:"+nymID+",accountID:"+accountID);
            boolean success = new OpenTransactionAccount().sendTransfer(serverID, nymID, accountID,jTextField2.getText(),jTextArea1.getText(),jTextField1.getText());
            /**
             * Reload the inbox and top accounts panel if success
             */
            if(success){
                JOptionPane.showMessageDialog(this, "Account to Account Transfer done successfully","Success",JOptionPane.INFORMATION_MESSAGE);
View Full Code Here

    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    // End of variables declaration//GEN-END:variables
private void initValues() {
        OpenTransactionAccount otAccount = new OpenTransactionAccount();
        accountMap = otAccount.getAccounts(accountID,serverID);
        Helpers.populateCombo(accountMap, jComboBox1);

    }
View Full Code Here

TOP

Related Classes of com.moneychanger.core.OpenTransactionAccount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.