/trunk/Kona.Web/App_Code/cs/Plugins/Payment/FakePaymentGateway.cs
C# | 28 lines | 16 code | 8 blank | 4 comment | 0 complexity | 8f9b57fedb43cd327ab668d7599ce3bb MD5 | raw file
Possible License(s): BSD-3-Clause
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Web; 5using Kona.Infrastructure; 6using Kona.Model; 7using System.Runtime.Serialization; 8 9namespace Microsoft.Web.Commerce.Plugins { 10 11 public class FakePaymentGateway:KonaPlugin { 12 13 public Transaction AuthorizeCreditCard(Order order) { 14 15 //this is a fake processor for testing... 16 //if there are transaction errors, 17 //pop them into the TransactionErrors on the Transaction object 18 //for display to the end user 19 string authCode = System.Guid.NewGuid().ToString().Substring(0, 10); 20 21 Transaction t = new Transaction(order.ID, order.Total, authCode, "FakePaymentGateway"); 22 23 return t; 24 25 } 26 27 } 28}