TeaCommerce.Library.GetPaymentForm - Error - "Sequence contains more than one matching element"
I'm using Tea Commerce1.4.2.0 BETA 4 and getting an error when calling TeaCommerce.Library.GetPaymentForm.
Sequence contains more than one matching element
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.InvalidOperationException: Sequence contains more than one matching element
Source Error:
Line 149: public static string GetPaymentForm()
Line 150: {
Line 151: return TeaCommerce.Library.GetPaymentForm("<input id=\"MattButton1\" type=\"button\" value=\"Pay\" />");
Line 152: }
Line 153:
It would seem there's a line of linq logic in TeaCommerce.PaymentProviders.PayPal.GenerateForm that is returning more than one item when only one is expected.
I've had a look in the back end to see if I have configured anything wrong but it seems OK.
Further more, the same call to GetPaymentForm works fine if the payment method is Account.
Just looked at the code for the PayPal provider - and it may look like we try and fetch some info about the orderline properties for the "productNumber" and "productName" properties. Can you verify that maybe your orderline have two of the same orderline properties for one of the keys?
My Tea Commerce 'General settings' are pretty much out of the box
and so is my Product document type
I have two sites, German & English and it's all set up pretty much like the multilanguage starter kit although that was not actually installed.
The English site product node looks like this
and it links to the Master product which looks like this
Looking in the database, the TeaCommerce_OrderLineProperty table contains the following records for the orderline (ID 89) in question
So yes, I do have two orderline properties for one of the keys, one for each language (2 = German, 3 = English UK). The language for my PayPal setting (shown above) is US. Could that be the problem?
TeaCommerce.Library.GetPaymentForm - Error - "Sequence contains more than one matching element"
Sequence contains more than one matching element
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: Sequence contains more than one matching element
Source Error:
Line 149: public static string GetPaymentForm() Line 150: { Line 151: return TeaCommerce.Library.GetPaymentForm("<input id=\"MattButton1\" type=\"button\" value=\"Pay\" />"); Line 152: } Line 153:
Source File: D:\Websites\stahldatsx-umbraco\idseefeld.steel\idseefeld.steel\EcommerceHelper.cs Line: 151
Stack Trace:
Hi Matt
Just looked at the code for the PayPal provider - and it may look like we try and fetch some info about the orderline properties for the "productNumber" and "productName" properties. Can you verify that maybe your orderline have two of the same orderline properties for one of the keys?
Kind regards
Anders
Hi Anders,
My Tea Commerce 'General settings' are pretty much out of the box
and so is my Product document type
I have two sites, German & English and it's all set up pretty much like the multilanguage starter kit although that was not actually installed.
The English site product node looks like this
and it links to the Master product which looks like this
Looking in the database, the TeaCommerce_OrderLineProperty table contains the following records for the orderline (ID 89) in question
So yes, I do have two orderline properties for one of the keys, one for each language (2 = German, 3 = English UK).
The language for my PayPal setting (shown above) is US. Could that be the problem?
Regards,
Matt
Hi Matt
Looks like you found a bug - I have fixed it in the new beta 5 you can download at http://our.umbraco.org/projects/website-utilities/tea-commerce
Give it a try and tell me if it works :)
Kind regards
Anders
That's me, beta tester extraordinaire. ;-)
I'll try it shortly and let you know.
Thanks.
Works great, good work.
Just in time too as I'm doing a small demo of it this morning.
is working on a reply...