當前位置: 首頁>>代碼示例>>Java>>正文


Java IdealException類代碼示例

本文整理匯總了Java中com.ing.ideal.connector.IdealException的典型用法代碼示例。如果您正苦於以下問題:Java IdealException類的具體用法?Java IdealException怎麽用?Java IdealException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IdealException類屬於com.ing.ideal.connector包,在下文中一共展示了IdealException類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testOrderSuccuess

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testOrderSuccuess() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        int amount = 1;
        int amountFormat = amount * 100;
        
        Transaction transaction = new Transaction();
        transaction.setIssuerID(issuerId);
        transaction.setAmount(Integer.toString(amountFormat));
        transaction.setPurchaseID(orderId);
        transaction.setDescription(orderDiscription);
        
        Random random = new Random();
        String EntranceCode = Long.toString(Math.abs(random.nextLong()), 36);
        transaction.setEntranceCode(EntranceCode);
        transaction.setMerchantReturnURL(merchantReturnURL);
        Transaction trx = connector.requestTransaction(transaction);
        String transactionId = trx.getTransactionID();
        Transaction transactionCustomer = connector.requestTransactionStatus(transactionId);
        transactionCustomer.isSuccess();
        Debug.logInfo("[testOrderSuccuess] IssuerID Messages from iDEAL: " + transactionCustomer.getIssuerID(), module);
        Debug.logInfo("[testOrderSuccuess] Status Messages from iDEAL: " + transactionCustomer.getStatus(), module);
    } catch (IdealException ex) {
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:27,代碼來源:IdealPaymentServiceTest.java

示例2: testOrderCancelled

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testOrderCancelled() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        int amount = 2;
        int amountFormat = amount * 100;
        
        Transaction transaction = new Transaction();
        transaction.setIssuerID(issuerId);
        transaction.setAmount(Integer.toString(amountFormat));
        transaction.setPurchaseID(orderId);
        transaction.setDescription(orderDiscription);
        
        Random random = new Random();
        String EntranceCode = Long.toString(Math.abs(random.nextLong()), 36);
        transaction.setEntranceCode(EntranceCode);
        transaction.setMerchantReturnURL(merchantReturnURL);
        Transaction trx = connector.requestTransaction(transaction);
        String transactionId = trx.getTransactionID();
        Transaction transactionCustomer = connector.requestTransactionStatus(transactionId);
        transactionCustomer.isCancelled();
        Debug.logInfo("[testOrderCancelled] IssuerID Messages from iDEAL: " + transactionCustomer.getIssuerID(), module);
        Debug.logInfo("[testOrderCancelled] Status Messages from iDEAL: " + transactionCustomer.getStatus(), module);
    } catch (IdealException ex) {
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:27,代碼來源:IdealPaymentServiceTest.java

示例3: testOrderExpired

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testOrderExpired() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        int amount = 3;
        int amountFormat = amount * 100;
        
        Transaction transaction = new Transaction();
        transaction.setIssuerID(issuerId);
        transaction.setAmount(Integer.toString(amountFormat));
        transaction.setPurchaseID(orderId);
        transaction.setDescription(orderDiscription);
        
        Random random = new Random();
        String EntranceCode = Long.toString(Math.abs(random.nextLong()), 36);
        transaction.setEntranceCode(EntranceCode);
        transaction.setMerchantReturnURL(merchantReturnURL);
        Transaction trx = connector.requestTransaction(transaction);
        String transactionId = trx.getTransactionID();
        Transaction transactionCustomer = connector.requestTransactionStatus(transactionId);
        transactionCustomer.isExpired();
        Debug.logInfo("[testOrderExpired] IssuerID Messages from iDEAL: " + transactionCustomer.getIssuerID(), module);
        Debug.logInfo("[testOrderExpired] Status Messages from iDEAL: " + transactionCustomer.getStatus(), module);
    } catch (IdealException ex) {
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:27,代碼來源:IdealPaymentServiceTest.java

示例4: testOrderOpen

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testOrderOpen() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        int amount = 4;
        int amountFormat = amount * 100;
        
        Transaction transaction = new Transaction();
        transaction.setIssuerID(issuerId);
        transaction.setAmount(Integer.toString(amountFormat));
        transaction.setPurchaseID(orderId);
        transaction.setDescription(orderDiscription);
        
        Random random = new Random();
        String EntranceCode = Long.toString(Math.abs(random.nextLong()), 36);
        transaction.setEntranceCode(EntranceCode);
        transaction.setMerchantReturnURL(merchantReturnURL);
        Transaction trx = connector.requestTransaction(transaction);
        String transactionId = trx.getTransactionID();
        Transaction transactionCustomer = connector.requestTransactionStatus(transactionId);
        transactionCustomer.isOpen();
        Debug.logInfo("[testOrderOpen] IssuerID Messages from iDEAL: " + transactionCustomer.getIssuerID(), module);
        Debug.logInfo("[testOrderOpen] Status Messages from iDEAL: " + transactionCustomer.getStatus(), module);
    } catch (IdealException ex) {
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:27,代碼來源:IdealPaymentServiceTest.java

示例5: testOrderFailure

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testOrderFailure() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        int amount = 5;
        int amountFormat = amount * 100;
        
        Transaction transaction = new Transaction();
        transaction.setIssuerID(issuerId);
        transaction.setAmount(Integer.toString(amountFormat));
        transaction.setPurchaseID(orderId);
        transaction.setDescription(orderDiscription);
        
        Random random = new Random();
        String EntranceCode = Long.toString(Math.abs(random.nextLong()), 36);
        transaction.setEntranceCode(EntranceCode);
        transaction.setMerchantReturnURL(merchantReturnURL);
        Transaction trx = connector.requestTransaction(transaction);
        String transactionId = trx.getTransactionID();
        Transaction transactionCustomer = connector.requestTransactionStatus(transactionId);
        transactionCustomer.isFailure();
        Debug.logInfo("[testOrderFailure] IssuerID Messages from iDEAL: " + transactionCustomer.getIssuerID(), module);
        Debug.logInfo("[testOrderFailure] Status Messages from iDEAL: " + transactionCustomer.getStatus(), module);
    } catch (IdealException ex) {
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:27,代碼來源:IdealPaymentServiceTest.java

示例6: testDirectoryRequest

import com.ing.ideal.connector.IdealException; //導入依賴的package包/類
public void testDirectoryRequest() throws Exception{
    try {
        IdealConnector connector = new IdealConnector(configFile);
        connector.getIssuerList();
    } catch (IdealException ex){
        TestCase.fail(ex.getMessage());
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:9,代碼來源:IdealPaymentServiceTest.java


注:本文中的com.ing.ideal.connector.IdealException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。