I have defined the payment type before checkoutService.performCheckout().
Code: Select all
public String completeCheckout(HttpServletRequest request, HttpServletResponse response, Model model,
@ModelAttribute("billingInfoForm") BillingInfoForm billingForm,
BindingResult result) throws CheckoutException, PricingException, ServiceException {
Order order=CartState.getCart();
System.out.println(order.getPaymentInfos());
if (order != null)
{
Map<PaymentInfo, Referenced> payments = new HashMap<PaymentInfo, Referenced>();
PaymentInfo wire = paymentInfoService.create();
String uniqueReferenceNumber=String.valueOf(order.getId());
wire.setType(PaymentInfoType.WIRE);
wire.setOrder(order);
wire.setAmount(order.getTotal());
wire.setReferenceNumber(uniqueReferenceNumber);
initializeOrderForCheckout(order);
payments.put(wire, wire.createEmptyReferenced());
CheckoutResponse checkoutResponse = checkoutService.performCheckout(order,payments);
return getConfirmationView(order.getOrderNumber());
}
return getCartPageRedirect();
}
But this is not working for me.
If I do transaction from paypal then that order entry is being reflected in the database under table blc_order_payment.
But if I am doing transaction from wire then its entry is not coming in table blc_order_payment??
I have defined the payment_type wire in the checkout controller.
Can you please guide where I am going wrong?
Thanks and Regards
Ankit Aggarwal