The steps needed to execute a call to my paymentprovider escapes me
I need some help here with the next steps to take.
1. I need to get a order number assigned to my order. I can see the basket in the backend but it hasn't been assigned a ordernumber yet? What to do?
2. The customer is finished with adding items to their basket and navigates to the order summary page. The customer clicks the "pay" button. What should happen then? My paymentprovider wants me to make a javascript call with all the needed parameters to their payment gateway. I can do this but it escapes me what steps i need to take to interact with uCommerce at this point. What methods to call in what order?
When that is done, you need to add the payment to the order and call UCommerce.Api.TransactionLibrary.CreatePayment(paymentMethod.Id, basket.OrderTotal.Value, true, true);
This will make the payment request, and when the payment is cleared your checkout pipeline will get executed (adding a order number, and many other thing).
What does the RequestPayment and OverwriteExisting parameters on the createPayment method do? How do I use them? Can seem to find documentation explaining this.
Why do you wan't an order number assigned when the user hasn't purchased anything yet? The checkout pipeline are ment to be run when the user has returned from the shop. It's basically then one converting the basket to an actual order.
If you only have one payment method allowed (EPay), then you could do it that way. Clicking the "pay" button should call the basketpipeline and requestpayment like so:
The steps needed to execute a call to my paymentprovider escapes me
I need some help here with the next steps to take.
1. I need to get a order number assigned to my order. I can see the basket in the backend but it hasn't been assigned a ordernumber yet? What to do?
2. The customer is finished with adding items to their basket and navigates to the order summary page. The customer clicks the "pay" button. What should happen then? My paymentprovider wants me to make a javascript call with all the needed parameters to their payment gateway. I can do this but it escapes me what steps i need to take to interact with uCommerce at this point. What methods to call in what order?
Byw i use EPay as my paymentprovider.
Anyone?
Hi Jan
There is a build-in EPay provider giving you all? the points you mention, out of the box.
You need to configure the config files: http://www.publicvoid.dk/SetupUCommerceToIncludeEPayAsAPaymentMethod.aspx
When that is done, you need to add the payment to the order and call
UCommerce.Api.TransactionLibrary.CreatePayment(paymentMethod.Id, basket.OrderTotal.Value, true, true);
This will make the payment request, and when the payment is cleared your checkout pipeline will get executed (adding a order number, and many other thing).
Hope it makes sense :)
So that means i can't have a orderNumber before the payment has returned from the payment provider?
I have configured the EPay.config as described.
How do I add the payment to the order?
Like this?
UCommerce.Api.TransactionLibrary.CreatePayment(pMethod.Id, basket.OrderTotal.Value, true, true);
You can call
with "false" to Request payment.
Also, uCommerce own RazorStore contains a lot of code examples: https://bitbucket.org/uCommerce/ucommerce-razor-store/src/cea5521ae294?at=default
What does the RequestPayment and OverwriteExisting parameters on the createPayment method do? How do I use them? Can seem to find documentation explaining this.
Hi Jan.
Why do you wan't an order number assigned when the user hasn't purchased anything yet? The checkout pipeline are ment to be run when the user has returned from the shop. It's basically then one converting the basket to an actual order.
If you only have one payment method allowed (EPay), then you could do it that way. Clicking the "pay" button should call the basketpipeline and requestpayment like so:
Please note that you need to have created the payment. Do it like Nickolai suggests.
If anything is missing uCommerce will fail fast and tell you :)
Regards
Morten
is working on a reply...