/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
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using Kona.Infrastructure;
- using Kona.Model;
- using System.Runtime.Serialization;
-
- namespace Microsoft.Web.Commerce.Plugins {
-
- public class FakePaymentGateway:KonaPlugin {
-
- public Transaction AuthorizeCreditCard(Order order) {
-
- //this is a fake processor for testing...
- //if there are transaction errors,
- //pop them into the TransactionErrors on the Transaction object
- //for display to the end user
- string authCode = System.Guid.NewGuid().ToString().Substring(0, 10);
-
- Transaction t = new Transaction(order.ID, order.Total, authCode, "FakePaymentGateway");
-
- return t;
-
- }
-
- }
- }