Hello,
I'm trying to integrate PayU (http://www.en.payu.pl/documentation/creating-new-payment) payment system with broadleaf. Unfortunately I'm not sure what is the right approach for implementing checkout workflow. Let me explain the problem.
First of all, PayU basics:
I guess, it is quite similar to AuthorizeNet.
1. You need to place a form as a last step of your checkout page (see above link). Form needs to include PayU URL, billing address data, amount, orderId etc.
2. After submitting a POST request, user is redirected to PayU page. Here, user can select his type of bank account, credit card or whatever, and make a payment.
3. On successful payment, PayU notifies publicly available URL. This URL is configured in your PayU account .
4. When notified by PayU, Broadleaf retrieves the status and updates the order.
Where/When should I initialize the checkout workflow? If I understand correctly, default activities of checkout workflow verifies if user is allowed to use "promo codes" and initialize the payment. So it doesn't make sense to start that workflow after payment has been made (via PayU website). Maybe I can skip that workflow, and in step 4 I just assign a PaymentInfo to the orded?
Additional problem is saving the billing address. If submitting the form with billing address redirects to PayU, then the billing address is lost, because we do not make a request to our controller. I could make additional step in checkout process (between 1. and 2.) In that step, instead of making a submit request to PayU, I make a request to my controller, passing billing address. And here is another problem, where should I store that address in the order? The only right place I can see right now, is the PaymentInfo - however, if I understand correctly, paymentInfo object stands for payment that has been already made. But no payment has been made yet, so that would need to be some fake payment info, just to hold the billing address. On the other side, I can live without billing address assigned to the order. I do have that in my PayU account - however, it would be nice if everything is also stored in broadleaf database.
I'd really appreciate your opinions and verifications if my assumptions are correct.
Regards
Raphal
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.