PageRenderTime 52ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

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