if (purchaseOrder.Customer == null)
{
Customer customer = this.TryGetCustomerFromLoggedInMember();
if (customer == null)
{
OrderAddress billingAddress = purchaseOrder.GetBillingAddress();
if (billingAddress == null)
throw new InvalidOperationException(string.Format("No billing address is set for order {0}. Please add an OrderAddress and set that as the billing address of the order.", (object) purchaseOrder.OrderGuid));
customer = this.TryGetCustomerFromEmail(billingAddress) ?? this.NewCustomerFromAddress(billingAddress);
}
purchaseOrder.Customer = customer;
}
Checkout problem in customized Razor store
I have a simple shop with built on the Razor store with a few simple products and changed it all to danish.
Now I seem to be stuck with an issue in the checkout/payment step.
I get an exception in the Preview.cshtml linie 9:
TransactionLibrary.RequestPayments();
Exception occoured while processing pipeline 'UCommerce.Pipelines.Checkout.CheckoutPipeline'. See inner exception for details.
and the inner exception is:
{"Sequence contains more than one element"}
I have only one form of payment, and have set it to use "Default Payment Method Service"
Previously i tested it with default settings - where it used the Amazon FPS, and it worked fine in a test project
Maybe I should look more into the payment providers, but any hints would be appreciated
/Michael Knudsen - OnePoint
Does this error repeats itself if you clear the basketid, and add new products to the basket?
Yes, tried to delete cookies to get a new basket - and in different browsers also.
But I have now implemented Paypal payment, and it works fine, so must be something with the default payment provider.
Tip: the payment config files are under the /Payments in the configuration folder
and this is setup in the web.config:
<payPalPaymentMethodServiceconfigSource="umbraco\ucommerce\configuration\payments\PayPal.config" />
Maybe this can help...
I can see the payment getting added to the uCommerce_Payment table - with PaymentStatusId =1 (new)
on another test setup where it works - i see that the statusId is 10000003 (Acquired)
I was thinking it was because of diffent currency - but tried to set it back to EUR everywhere - and it didn't help
And it is still using the Razor shop pipelines and config files, only changed paypal config file afterwards - and it works fine.
I have tried and compare a working version with the one with the problem.
At first i thought it could be something to do with culture and currency - but it was not.
But if i take out this line in the checkout pipeline - everything works:
<value>${Checkout.CreateCustomer}</value>
My question now is - what does the CreateCustomer step do?
This is the code from dotPeak
thanks
The PO gets the billing and shipping info correct in the OrderAddress table...
But i guess its the TryGetCust... that somehow failes for some reason - interesting...
is working on a reply...