ChrisCompleteCodeTrunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SecureSubmit.Services;
using SecureSubmit.Entities;
namespace Action_Tire_Payment_Processor
{
public sealed class CardInfo
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
public decimal Amount { get; set; }
public string CardNumber { get; set; }
public int ExpirationMonth { get; set; }
public int ExpirationYear { get; set; }
public string Ccv { get; set; }
public CardInfo(string firstName, string lastName, string address, string city, string state, string zip, string amount, string cardNumber, string expirationDate, string ccv)
{
FirstName = firstName.Trim();
LastName = lastName.Trim();
Address = address.Trim();
City = city.Trim();
State = state.Trim();
Zip = zip.Trim();
Amount = Convert.ToDecimal(amount);
CardNumber = cardNumber.Trim();
string[] expsplit = expirationDate.Split('/');
if (expsplit.Length > 1)
{
ExpirationMonth = Convert.ToInt32(expsplit[0]);
ExpirationYear = Convert.ToInt32(expsplit[1]) + 2000;
}
Ccv = ccv;
}
public HpsAddress ToHpsAddress()
{
return new HpsAddress()
{
Address = Address,
City = City,
State = State,
Zip = Zip
};
}
public HpsCardHolder ToHpsCardHolder()
{
return new HpsCardHolder()
{
Address = ToHpsAddress(),
FirstName = FirstName,
LastName = LastName
};
}
public HpsCreditCard ToHpsCreditCard()
{
return new HpsCreditCard()
{
Number = CardNumber,
ExpMonth = ExpirationMonth,
ExpYear = ExpirationYear,
Cvv = Ccv
};
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
BBDSCHRIS
|
Wed 22 Aug, 2018 20:08:03 +0000 |
|