Thursday, May 19, 2011

ASPDNSF + QuickBooks Gateway + Zip 5-4 = Error

Version: AspDotNetStorefront


Billing addresses with zip 5-4 e.g. 90019-5929 causes the QuickBooks gateway to error with the following message: The string X in the field CreditCardPostalCode is too long. The maximum length is 9.


In file: \ASPDNSFGateways\QBMerchantServices.cs make the following modification:

//mod start Aydus 5/09/2011: Strip any non-numeric characters from zip. e.g. dash when address validation turned on.
System.Text.RegularExpressions.Regex nonNumericCharacters = new System.Text.RegularExpressions.Regex(@"[^0-9]");
creditCard.BillingPostalCode = nonNumericCharacters.Replace(UseBillingAddress.Zip, String.Empty);
//creditCard.BillingPostalCode = UseBillingAddress.Zip;
//mod end

Tuesday, May 17, 2011

How to Get ASPDotNetStorefront Store URL

Version: AspDotNetStorefront 8.x


How do I get the current store url?


There are a number of variables available.
In an XMLPackage use the following: <xsl:value-of select= “/root/System/StoreUrl” />
In .NET call the following function AppLogic.GetStoreHTTPLocation or AppLogic.GetStoreDomain