@Test public void testAuthCapture() { assumeTrue(isTestAllowed()); String orderNum = UUID.randomUUID().toString(); CustomerOrder customerOrder = createCustomerOrder(orderNum); assertEquals(Payment.PAYMENT_STATUS_FAILED, paymentProcessor.authorizeCapture( customerOrder, false, false, createCardParameters())); assertEquals(2, customerOrderPaymentService.findPayments( orderNum, null, Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED, PaymentGateway.AUTH_CAPTURE).size()); }
@Override public Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH_CAPTURE); payment.setTransactionReferenceId(UUID.randomUUID().toString()); payment.setTransactionAuthorizationCode(UUID.randomUUID().toString()); payment.setPaymentProcessorResult(Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED); payment.setPaymentProcessorBatchSettlement(false); return payment; }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH_CAPTURE); payment.setTransactionReferenceId(UUID.randomUUID().toString()); payment.setTransactionAuthorizationCode(UUID.randomUUID().toString()); payment.setPaymentProcessorResult(Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED); payment.setPaymentProcessorBatchSettlement(false); return payment; } }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH_CAPTURE); payment.setTransactionReferenceId(UUID.randomUUID().toString()); payment.setTransactionAuthorizationCode(UUID.randomUUID().toString()); payment.setPaymentProcessorResult(Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED); payment.setPaymentProcessorBatchSettlement(false); return payment; }  }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH_CAPTURE); payment.setTransactionReferenceId(UUID.randomUUID().toString()); payment.setTransactionAuthorizationCode(UUID.randomUUID().toString()); payment.setPaymentProcessorResult(Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED); payment.setPaymentProcessorBatchSettlement(false); return payment; }  @Override synchronized PaymentGatewayFeature getPaymentGatewayFeatures(); @Override Payment authorize(final Payment paymentIn, final boolean forceProcessing); @Override Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing); @Override Payment reverseAuthorization(final Payment paymentIn, final boolean forceProcessing); @Override Payment voidCapture(final Payment paymentIn, final boolean forceProcessing); @Override Payment refund(final Payment paymentIn, final boolean forceProcessing); @Override Payment capture(final Payment paymentIn, final boolean forceProcessing); @Override String getHtmlForm(final String cardHolderName, final String locale, final BigDecimal amount,
                              final String currencyCode, final String orderReference, final Payment payment); @Override Payment createPaymentPrototype(final String operation, final Map parametersMap, final boolean forceProcessing); }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH_CAPTURE); payment.setTransactionReferenceId(UUID.randomUUID().toString()); payment.setTransactionAuthorizationCode(UUID.randomUUID().toString()); payment.setPaymentProcessorResult(Payment.PAYMENT_STATUS_MANUAL_PROCESSING_REQUIRED); payment.setPaymentProcessorBatchSettlement(false); return payment; }  @Override synchronized PaymentGatewayFeature getPaymentGatewayFeatures(); @Override Payment authorize(final Payment paymentIn, final boolean forceProcessing); @Override Payment authorizeCapture(final Payment paymentIn, final boolean forceProcessing); @Override Payment reverseAuthorization(final Payment paymentIn, final boolean forceProcessing); @Override Payment voidCapture(final Payment paymentIn, final boolean forceProcessing); @Override Payment refund(final Payment paymentIn, final boolean forceProcessing); @Override Payment capture(final Payment paymentIn, final boolean forceProcessing); @Override String getHtmlForm(final String cardHolderName, final String locale, final BigDecimal amount,
                              final String currencyCode, final String orderReference, final Payment payment); @Override Payment createPaymentPrototype(final String operation, final Map parametersMap, final boolean forceProcessing);  }