@Test public void testAuthPlusCapture() { assumeTrue(isTestAllowed()); String orderNum = UUID.randomUUID().toString(); CustomerOrder customerOrder = createCustomerOrder(orderNum); assertEquals(Payment.PAYMENT_STATUS_OK, paymentProcessor.authorize( customerOrder, false, false, createCardParameters())); assertEquals(2, customerOrderPaymentService.findPayments( orderNum, null, Payment.PAYMENT_STATUS_OK, PaymentGateway.AUTH).size()); Iterator<CustomerOrderDelivery> iter = customerOrder.getDelivery().iterator(); assertEquals(Payment.PAYMENT_STATUS_OK, paymentProcessor.shipmentComplete(customerOrder, iter.next().getDeliveryNum(), false)); assertEquals(1, customerOrderPaymentService.findPayments( orderNum, null, Payment.PAYMENT_STATUS_OK, PaymentGateway.CAPTURE).size()); assertEquals(Payment.PAYMENT_STATUS_OK, paymentProcessor.shipmentComplete(customerOrder, iter.next().getDeliveryNum(), false)); assertEquals(2, customerOrderPaymentService.findPayments( orderNum, null, Payment.PAYMENT_STATUS_OK, PaymentGateway.CAPTURE).size()); }
@Override public Payment authorize(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH); final NvpBuilder npvs = createAuthRequest(payment, "Authorization"); return runTransaction("DoDirectPayment", npvs.toMap(), payment, AUTH); }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorize(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH); final NvpBuilder npvs = createAuthRequest(payment, "Authorization"); return runTransaction("DoDirectPayment", npvs.toMap(), payment, AUTH); } }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorize(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH); final NvpBuilder npvs = createAuthRequest(payment, "Authorization"); return runTransaction("DoDirectPayment", npvs.toMap(), payment, AUTH); }  }
PayPalProPaymentGatewayImpl extends AbstractPayPalNVPPaymentGatewayImpl implements PaymentGatewayInternalForm { @Override public Payment authorize(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH); final NvpBuilder npvs = createAuthRequest(payment, "Authorization"); return runTransaction("DoDirectPayment", npvs.toMap(), payment, AUTH); }  @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 authorize(final Payment paymentIn, final boolean forceProcessing) { final Payment payment = (Payment) SerializationUtils.clone(paymentIn); payment.setTransactionOperation(AUTH); final NvpBuilder npvs = createAuthRequest(payment, "Authorization"); return runTransaction("DoDirectPayment", npvs.toMap(), payment, AUTH); }  @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);  }