本文整理匯總了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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}