@Test public void testTerminalApiStatusRequest() throws Exception { TerminalAPIRequest terminalApiRequest = adyenRequestFactory.createTerminalAPIRequestForStatus(cartDataMock, SERVICE_ID); assertNotNull(terminalApiRequest); assertNotNull(terminalApiRequest.getSaleToPOIRequest()); assertNotNull(terminalApiRequest.getSaleToPOIRequest().getMessageHeader()); MessageHeader messageHeader = terminalApiRequest.getSaleToPOIRequest().getMessageHeader(); assertNotNull(messageHeader.getServiceID()); assertEquals(STORE_NAME, messageHeader.getSaleID()); assertEquals(TERMINAL_ID, messageHeader.getPOIID()); assertNotNull(terminalApiRequest.getSaleToPOIRequest().getTransactionStatusRequest()); TransactionStatusRequest transactionStatusRequest = terminalApiRequest.getSaleToPOIRequest().getTransactionStatusRequest(); assertNotNull(transactionStatusRequest.getMessageReference()); assertNotNull(transactionStatusRequest.getMessageReference().getMessageCategory()); assertEquals(MessageCategoryType.PAYMENT, transactionStatusRequest.getMessageReference().getMessageCategory()); assertNotNull(transactionStatusRequest.getMessageReference().getSaleID()); assertEquals(STORE_NAME, transactionStatusRequest.getMessageReference().getSaleID()); assertNotNull(transactionStatusRequest.getMessageReference().getServiceID()); assertEquals(SERVICE_ID, transactionStatusRequest.getMessageReference().getServiceID()); }
public TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId) { TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); MessageReference messageReference = new MessageReference(); messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(cartData.getStore()); messageReference.setServiceID(originalServiceId); transactionStatusRequest.setMessageReference(messageReference); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); String serviceId = Long.toString(System.currentTimeMillis() % 10000000000L); TerminalAPIRequestBuilder builder = new TerminalAPIRequestBuilder(cartData.getStore(), serviceId, cartData.getAdyenTerminalId()); builder.withTransactionStatusRequest(transactionStatusRequest); return builder.build(); }
AdyenRequestFactory { public TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId) { TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); MessageReference messageReference = new MessageReference(); messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(cartData.getStore()); messageReference.setServiceID(originalServiceId); transactionStatusRequest.setMessageReference(messageReference); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); String serviceId = Long.toString(System.currentTimeMillis() % 10000000000L); TerminalAPIRequestBuilder builder = new TerminalAPIRequestBuilder(cartData.getStore(), serviceId, cartData.getAdyenTerminalId()); builder.withTransactionStatusRequest(transactionStatusRequest); return builder.build(); } }
AdyenRequestFactory { public TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId) { TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); MessageReference messageReference = new MessageReference(); messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(cartData.getStore()); messageReference.setServiceID(originalServiceId); transactionStatusRequest.setMessageReference(messageReference); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); String serviceId = Long.toString(System.currentTimeMillis() % 10000000000L); TerminalAPIRequestBuilder builder = new TerminalAPIRequestBuilder(cartData.getStore(), serviceId, cartData.getAdyenTerminalId()); builder.withTransactionStatusRequest(transactionStatusRequest); return builder.build(); }  }
AdyenRequestFactory { public TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId) { TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); MessageReference messageReference = new MessageReference(); messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(cartData.getStore()); messageReference.setServiceID(originalServiceId); transactionStatusRequest.setMessageReference(messageReference); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); String serviceId = Long.toString(System.currentTimeMillis() % 10000000000L); TerminalAPIRequestBuilder builder = new TerminalAPIRequestBuilder(cartData.getStore(), serviceId, cartData.getAdyenTerminalId()); builder.withTransactionStatusRequest(transactionStatusRequest); return builder.build(); }  PaymentRequest3d create3DAuthorizationRequest(final String merchantAccount, final HttpServletRequest request, final String md, final String paRes); @Deprecated PaymentRequest createAuthorizationRequest(final String merchantAccount,
                                                     final CartData cartData,
                                                     final HttpServletRequest request,
                                                     final CustomerModel customerModel,
                                                     final RecurringContractMode recurringContractMode); PaymentsDetailsRequest create3DPaymentsRequest(final String paymentData, final String md, final String paRes); PaymentsDetailsRequest create3DS2PaymentsRequest(final String paymentData, final String token, String type); PaymentsRequest createPaymentsRequest(final String merchantAccount,
                                                 final CartData cartData,
                                                 final RequestInfo requestInfo,
                                                 final CustomerModel customerModel,
                                                 final RecurringContractMode recurringContractMode); PaymentsRequest createPaymentsRequest(final String merchantAccount,
                                                 final CartData cartData,
                                                 final PaymentMethodDetails paymentMethodDetails,
                                                 final RequestInfo requestInfo,
                                                 final CustomerModel customerModel); PaymentsRequest enhanceForThreeDS2(PaymentsRequest paymentsRequest, CartData cartData); BrowserInfo updateBrowserInfoFromRequest(BrowserInfo browserInfo, PaymentsRequest paymentsRequest); ApplicationInfo updateApplicationInfoEcom(ApplicationInfo applicationInfo); ApplicationInfo updateApplicationInfoPos(ApplicationInfo applicationInfo); CaptureRequest createCaptureRequest(final String merchantAccount, final BigDecimal amount, final Currency currency, final String authReference, final String merchantReference); CancelOrRefundRequest createCancelOrRefundRequest(final String merchantAccount, final String authReference, final String merchantReference); RefundRequest createRefundRequest(final String merchantAccount, final BigDecimal amount, final Currency currency, final String authReference, final String merchantReference); RecurringDetailsRequest createListRecurringDetailsRequest(final String merchantAccount, final String customerId); DisableRequest createDisableRequest(final String merchantAccount, final String customerId, final String recurringReference); TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId); TerminalAPIRequest createTerminalAPIRequest(final CartData cartData, CustomerModel customer, RecurringContractMode recurringContractMode, String serviceId); void setOpenInvoiceData(PaymentRequest paymentRequest, CartData cartData, final CustomerModel customerModel); void setOpenInvoiceData(PaymentsRequest paymentsRequest, CartData cartData); ConfigurationService getConfigurationService(); void setConfigurationService(ConfigurationService configurationService); }
AdyenRequestFactory { public TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId) { TransactionStatusRequest transactionStatusRequest = new TransactionStatusRequest(); transactionStatusRequest.setReceiptReprintFlag(true); MessageReference messageReference = new MessageReference(); messageReference.setMessageCategory(MessageCategoryType.PAYMENT); messageReference.setSaleID(cartData.getStore()); messageReference.setServiceID(originalServiceId); transactionStatusRequest.setMessageReference(messageReference); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CASHIER_RECEIPT); transactionStatusRequest.getDocumentQualifier().add(DocumentQualifierType.CUSTOMER_RECEIPT); String serviceId = Long.toString(System.currentTimeMillis() % 10000000000L); TerminalAPIRequestBuilder builder = new TerminalAPIRequestBuilder(cartData.getStore(), serviceId, cartData.getAdyenTerminalId()); builder.withTransactionStatusRequest(transactionStatusRequest); return builder.build(); }  PaymentRequest3d create3DAuthorizationRequest(final String merchantAccount, final HttpServletRequest request, final String md, final String paRes); @Deprecated PaymentRequest createAuthorizationRequest(final String merchantAccount,
                                                     final CartData cartData,
                                                     final HttpServletRequest request,
                                                     final CustomerModel customerModel,
                                                     final RecurringContractMode recurringContractMode); PaymentsDetailsRequest create3DPaymentsRequest(final String paymentData, final String md, final String paRes); PaymentsDetailsRequest create3DS2PaymentsRequest(final String paymentData, final String token, String type); PaymentsRequest createPaymentsRequest(final String merchantAccount,
                                                 final CartData cartData,
                                                 final RequestInfo requestInfo,
                                                 final CustomerModel customerModel,
                                                 final RecurringContractMode recurringContractMode); PaymentsRequest createPaymentsRequest(final String merchantAccount,
                                                 final CartData cartData,
                                                 final PaymentMethodDetails paymentMethodDetails,
                                                 final RequestInfo requestInfo,
                                                 final CustomerModel customerModel); PaymentsRequest enhanceForThreeDS2(PaymentsRequest paymentsRequest, CartData cartData); BrowserInfo updateBrowserInfoFromRequest(BrowserInfo browserInfo, PaymentsRequest paymentsRequest); ApplicationInfo updateApplicationInfoEcom(ApplicationInfo applicationInfo); ApplicationInfo updateApplicationInfoPos(ApplicationInfo applicationInfo); CaptureRequest createCaptureRequest(final String merchantAccount, final BigDecimal amount, final Currency currency, final String authReference, final String merchantReference); CancelOrRefundRequest createCancelOrRefundRequest(final String merchantAccount, final String authReference, final String merchantReference); RefundRequest createRefundRequest(final String merchantAccount, final BigDecimal amount, final Currency currency, final String authReference, final String merchantReference); RecurringDetailsRequest createListRecurringDetailsRequest(final String merchantAccount, final String customerId); DisableRequest createDisableRequest(final String merchantAccount, final String customerId, final String recurringReference); TerminalAPIRequest createTerminalAPIRequestForStatus(final CartData cartData, String originalServiceId); TerminalAPIRequest createTerminalAPIRequest(final CartData cartData, CustomerModel customer, RecurringContractMode recurringContractMode, String serviceId); void setOpenInvoiceData(PaymentRequest paymentRequest, CartData cartData, final CustomerModel customerModel); void setOpenInvoiceData(PaymentsRequest paymentsRequest, CartData cartData); ConfigurationService getConfigurationService(); void setConfigurationService(ConfigurationService configurationService);  }