@Test(expected = IllegalArgumentException.class) public void testCancelNullOrder() throws Exception { OrderProcessModel process = new OrderProcessModel(); wirecardProcessOrderCancellationAction.execute(process); }
@Override public String execute(OrderProcessModel process) throws Exception { LOG.info(START_MESSAGE); ServicesUtil.validateParameterNotNullStandardMessage("process", process); LOG.info(PROCESS_MESSAGE, process.getCode(), getClass().getSimpleName()); final OrderModel order = process.getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("order", order); final OrderCancelRecordEntryModel orderCancelRecordEntryModel = getOrderCancelService().getPendingCancelRecordEntry(order); final OrderCancelResponse orderCancelResponse = createOrderCancelResponseFromCancelRecordEntry(order, orderCancelRecordEntryModel); getWirecardPOExecutionService().executeAuthorizationCancelOperation(order); getOrderCancelCallbackService().onOrderCancelResponse(orderCancelResponse); OrderStatus orderStatus = getUpdatedOrderStatus(order); order.setStatus(orderStatus); getModelService().save(order); LOG.info(STATUS_MESSAGE, order.getCode(), orderStatus.getCode()); return calculateTransitionResult(order); }
WirecardProcessOrderCancellationAction extends ProcessOrderCancellationAction { @Override public String execute(OrderProcessModel process) throws Exception { LOG.info(START_MESSAGE); ServicesUtil.validateParameterNotNullStandardMessage("process", process); LOG.info(PROCESS_MESSAGE, process.getCode(), getClass().getSimpleName()); final OrderModel order = process.getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("order", order); final OrderCancelRecordEntryModel orderCancelRecordEntryModel = getOrderCancelService().getPendingCancelRecordEntry(order); final OrderCancelResponse orderCancelResponse = createOrderCancelResponseFromCancelRecordEntry(order, orderCancelRecordEntryModel); getWirecardPOExecutionService().executeAuthorizationCancelOperation(order); getOrderCancelCallbackService().onOrderCancelResponse(orderCancelResponse); OrderStatus orderStatus = getUpdatedOrderStatus(order); order.setStatus(orderStatus); getModelService().save(order); LOG.info(STATUS_MESSAGE, order.getCode(), orderStatus.getCode()); return calculateTransitionResult(order); } }
WirecardProcessOrderCancellationAction extends ProcessOrderCancellationAction { @Override public String execute(OrderProcessModel process) throws Exception { LOG.info(START_MESSAGE); ServicesUtil.validateParameterNotNullStandardMessage("process", process); LOG.info(PROCESS_MESSAGE, process.getCode(), getClass().getSimpleName()); final OrderModel order = process.getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("order", order); final OrderCancelRecordEntryModel orderCancelRecordEntryModel = getOrderCancelService().getPendingCancelRecordEntry(order); final OrderCancelResponse orderCancelResponse = createOrderCancelResponseFromCancelRecordEntry(order, orderCancelRecordEntryModel); getWirecardPOExecutionService().executeAuthorizationCancelOperation(order); getOrderCancelCallbackService().onOrderCancelResponse(orderCancelResponse); OrderStatus orderStatus = getUpdatedOrderStatus(order); order.setStatus(orderStatus); getModelService().save(order); LOG.info(STATUS_MESSAGE, order.getCode(), orderStatus.getCode()); return calculateTransitionResult(order); }  }
WirecardProcessOrderCancellationAction extends ProcessOrderCancellationAction { @Override public String execute(OrderProcessModel process) throws Exception { LOG.info(START_MESSAGE); ServicesUtil.validateParameterNotNullStandardMessage("process", process); LOG.info(PROCESS_MESSAGE, process.getCode(), getClass().getSimpleName()); final OrderModel order = process.getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("order", order); final OrderCancelRecordEntryModel orderCancelRecordEntryModel = getOrderCancelService().getPendingCancelRecordEntry(order); final OrderCancelResponse orderCancelResponse = createOrderCancelResponseFromCancelRecordEntry(order, orderCancelRecordEntryModel); getWirecardPOExecutionService().executeAuthorizationCancelOperation(order); getOrderCancelCallbackService().onOrderCancelResponse(orderCancelResponse); OrderStatus orderStatus = getUpdatedOrderStatus(order); order.setStatus(orderStatus); getModelService().save(order); LOG.info(STATUS_MESSAGE, order.getCode(), orderStatus.getCode()); return calculateTransitionResult(order); }  @Override String execute(OrderProcessModel process); @Required void setWirecardPOExecutionService(WirecardPOExecutionService wirecardPOExecutionService); }
WirecardProcessOrderCancellationAction extends ProcessOrderCancellationAction { @Override public String execute(OrderProcessModel process) throws Exception { LOG.info(START_MESSAGE); ServicesUtil.validateParameterNotNullStandardMessage("process", process); LOG.info(PROCESS_MESSAGE, process.getCode(), getClass().getSimpleName()); final OrderModel order = process.getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("order", order); final OrderCancelRecordEntryModel orderCancelRecordEntryModel = getOrderCancelService().getPendingCancelRecordEntry(order); final OrderCancelResponse orderCancelResponse = createOrderCancelResponseFromCancelRecordEntry(order, orderCancelRecordEntryModel); getWirecardPOExecutionService().executeAuthorizationCancelOperation(order); getOrderCancelCallbackService().onOrderCancelResponse(orderCancelResponse); OrderStatus orderStatus = getUpdatedOrderStatus(order); order.setStatus(orderStatus); getModelService().save(order); LOG.info(STATUS_MESSAGE, order.getCode(), orderStatus.getCode()); return calculateTransitionResult(order); }  @Override String execute(OrderProcessModel process); @Required void setWirecardPOExecutionService(WirecardPOExecutionService wirecardPOExecutionService);  }