Ucommerce not passing shipping cost to payment provider (SagePay)
Umbraco v6.1.5
uCommerce 3.6.5.13233
Based on uCommerce Demo Store - Razor 1.0.3.13143
Ucommerce is not adding the shipping cost in when the payment goes off to sagepay, if a user gets to sagepay, cancels the payment, comes back and runs through the process again going through the address action a second time it works.
The 3 main pages for the process are:
Cart -> Address -> Preview -> Sagepay
Cart is as per the demo store
Address saves the shipping and billing address, works out the shipping based on a field in the product and sets the cost
Preview shows the basket and how much it will cost THE SHIPPING COST IS SHOWN HERE EVEN THOUGH IT IS NOT PASSED TO
SAGEPAY
The OrderTotal are sent to SagePay. OrderTotal are calculated based on the shipment cost calculated in the associated ShippingMethodService. Have you implemented a shipping method service and registered it to calculate the shipping costs based on the Shipping parameter on your products? Or does the shipping the costs come from shippingmethods 11,16,24 or 9? Are the values saved on the shipping method service?
The amount for shipping comes from shippingmethods 11,16,24 or 9.
Shipping costs are calculated on a Shipping parameter on the products, the basket is looped through to work out what the highest amount of shipping is (one of 4 options) and then
calls the correct TransactionLibrary.CreateShipment to set the amount etc ie.
Ucommerce not passing shipping cost to payment provider (SagePay)
Umbraco v6.1.5
uCommerce 3.6.5.13233
Based on uCommerce Demo Store - Razor 1.0.3.13143
Ucommerce is not adding the shipping cost in when the payment goes off to sagepay, if a user gets to sagepay, cancels the payment, comes back and runs through the process again going through the address action a second time it works.
The 3 main pages for the process are: Cart -> Address -> Preview -> Sagepay
Cart is as per the demo store
Address saves the shipping and billing address, works out the shipping based on a field in the product and sets the cost
Preview shows the basket and how much it will cost THE SHIPPING COST IS SHOWN HERE EVEN THOUGH IT IS NOT PASSED TO SAGEPAY
Any ideas why?
Address .cshtml
The OrderTotal are sent to SagePay. OrderTotal are calculated based on the shipment cost calculated in the associated ShippingMethodService. Have you implemented a shipping method service and registered it to calculate the shipping costs based on the Shipping parameter on your products? Or does the shipping the costs come from shippingmethods 11,16,24 or 9? Are the values saved on the shipping method service?
Hi Morten,
The amount for shipping comes from shippingmethods 11,16,24 or 9.
Shipping costs are calculated on a Shipping parameter on the products, the basket is looped through to work out what the highest amount of shipping is (one of 4 options) and then calls the correct TransactionLibrary.CreateShipment to set the amount etc ie.
TransactionLibrary.CreateShipment(24, overwriteExisting: true);
I've implemented a workaround which adds an additional page so it now goes:
Cart -> Address -> Shipping -> Preview -> Sagepay
Shipping is never actually shown though it is just the payment calculation logic as above which seems to have fixed it though I have no idea why?
is working on a reply...