| Line 47... |
Line 47... |
| 47 |
/**
|
47 |
/**
|
| 48 |
* @param args
|
48 |
* @param args
|
| 49 |
*/
|
49 |
*/
|
| 50 |
public static void main(String[] args) {
|
50 |
public static void main(String[] args) {
|
| 51 |
try {
|
51 |
try {
|
| 52 |
|
- |
|
| 53 |
FlaggedPaymentProcessorTask newTask = new FlaggedPaymentProcessorTask();
|
52 |
FlaggedPaymentProcessorTask newTask = new FlaggedPaymentProcessorTask();
|
| 54 |
Client client = new TransactionClient().getClient();
|
53 |
Client client = new TransactionClient().getClient();
|
| 55 |
List<Long> transactionIds = client.getTransactionsRequiringExtraProcessing(ExtraTransactionProcessingType.PAYMENT_FLAGGED);
|
54 |
List<Long> transactionIds = client.getTransactionsRequiringExtraProcessing(ExtraTransactionProcessingType.PAYMENT_FLAGGED);
|
| 56 |
if (transactionIds != null && !transactionIds.isEmpty()) {
|
55 |
if (transactionIds != null && !transactionIds.isEmpty()) {
|
| 57 |
log.info("Fetched " + transactionIds.size() + " transactions");
|
56 |
log.info("Fetched " + transactionIds.size() + " transactions");
|
| 58 |
for (Long transactionId : transactionIds) {
|
57 |
for (Long transactionId : transactionIds) {
|
| 59 |
Client client1 = new TransactionClient().getClient();
|
58 |
client = new TransactionClient().getClient();
|
| 60 |
newTask.processFlaggedPayment(client1.getTransaction(transactionId).getCustomer_id());
|
59 |
newTask.processFlaggedPayment(client.getTransaction(transactionId).getCustomer_id());
|
| - |
|
60 |
client = new TransactionClient().getClient();
|
| 61 |
client1.markTransactionAsProcessed(transactionId, ExtraTransactionProcessingType.PAYMENT_FLAGGED);
|
61 |
client.markTransactionAsProcessed(transactionId, ExtraTransactionProcessingType.PAYMENT_FLAGGED);
|
| 62 |
}
|
62 |
}
|
| 63 |
}
|
63 |
}
|
| 64 |
else {
|
64 |
else {
|
| 65 |
log.info("No transactions to process");
|
65 |
log.info("No transactions to process");
|
| 66 |
}
|
66 |
}
|