public Response Delete(IProfileAttributes profileAttributes, IPaymentProfileAttributes paymentProfileAttributes) { var deletepaymentProfileAttributes = new Dictionary<string, object>(); deletepaymentProfileAttributes.Add("profileAttributes", profileAttributes); deletepaymentProfileAttributes.Add("paymentProfileAttributes", paymentProfileAttributes); return GetResponse(deletepaymentProfileAttributes, "deleteCustomerPaymentProfileRequest.spark", new DeleteCustomerPaymentProfileParser()); }
public Response Get(IProfileAttributes profileAttributes, IPaymentProfileAttributes paymentProfileAttributes) { var getpaymentProfileAttributes = new Dictionary<string, object>(); getpaymentProfileAttributes.Add("profileAttributes", profileAttributes); getpaymentProfileAttributes.Add("paymentProfileAttributes", paymentProfileAttributes); return GetResponse(getpaymentProfileAttributes, "getCustomerPaymentProfileRequest.spark", new GetCustomerPaymentProfileParser()); }
public Response Void(IProfileAttributes profileAttributes, IPaymentProfileAttributes paymentProfileAttributes, ITransaction transaction) { var voidAttributes = new Dictionary<string, object>(); voidAttributes.Add("profile", profileAttributes); voidAttributes.Add("paymentProfile", paymentProfileAttributes); voidAttributes.Add("transaction", transaction); return GetResponse(voidAttributes, "createCustomerProfileTransactionRequestVoid.spark", new CreateCustomerProfileTransactionParser()); }
//create a Charge method which will do only authcatpure //change ITransaction to TransactionType and make it protected public Response Charge(IProfileAttributes profileAttributes, IPaymentProfileAttributes paymentProfileAttributes, IOrder order) { var chargeAttributes = new Dictionary<string, object>(); chargeAttributes.Add("profile", profileAttributes); chargeAttributes.Add("paymentProfile", paymentProfileAttributes); chargeAttributes.Add("order", order); return GetResponse(chargeAttributes, "createCustomerProfileTransactionRequestAuthCapture.spark", new CreateCustomerProfileTransactionParser()); }
public Response Refund(IProfileAttributes profileAttributes, IPaymentProfileAttributes paymentProfileAttributes, decimal amount, ITransaction transaction) { var refundAttributes = new Dictionary<string, object>(); refundAttributes.Add("profile", profileAttributes); refundAttributes.Add("paymentProfile", paymentProfileAttributes); refundAttributes.Add("transaction", transaction); refundAttributes.Add("amount", amount); return GetResponse(refundAttributes, "createCustomerProfileTransactionRequestRefund.spark", new CreateCustomerProfileTransactionParser()); }
public void setup() { _profileAttributes = ObjectMother.GetMockProfileAttributes(x => { x.GateWayId = "123215"; }); _paymentProfileAttributes = ObjectMother.GetMockPaymentProfileAttributes(x => { x.GateWayId = "829831"; }); _getPaymentProfileAttributes = new Dictionary<string, object>(); _getPaymentProfileAttributes.Add("profileAttributes", _profileAttributes); _getPaymentProfileAttributes.Add("paymentProfileAttributes", _paymentProfileAttributes); }
public void Setup() { var random = new Random(); _profileAttributes = ObjectMother.GetMockProfileAttributes(x => { x.CustomerId = random.Next().ToString(); x.Email = "*****@*****.**"; }); _addressAttributes = ObjectMother.GetMockAddressAttributes(x => { x.FirstName = "Rafi"; x.LastName = "Sk"; x.Address = "Rajendranagar"; x.City = "Hyderabad"; x.State = "AP"; x.Zip = "500048"; x.Company = "cosmicvent"; x.Country = "India"; }); _creditCardAttributes = ObjectMother.GetMockCreditCardAttributes(x => { x.CardNumber = "4111111111111111"; x.ExpirationDate = DateTime.Now.AddMonths(1).ToString("yyyy-MM"); }); _paymentProfileAttributes = ObjectMother.GetMockPaymentProfileAttributes(); _order = ObjectMother.GetMockOrder(x => { x.Amount = random.Next(1, 5000); x.Description = "amount of" + random.Next(1, 5000); }); _transaction = ObjectMother.GetMockTransaction(x => { x.Type = TransactionType.AuthCapture; }); }
public void Setup() { var random = new Random(); _profileAttributes = ObjectMother.GetMockProfileAttributes(x => { x.CustomerId = random.Next().ToString(); x.Email = "*****@*****.**"; }); _addressAttributes = ObjectMother.GetMockAddressAttributes(x => { x.FirstName = "Rafi"; x.LastName = "Sk"; x.Address = "Rajendranagar"; x.City = "Hyderabad"; x.State = "AP"; x.Zip = "500048"; x.Company = "cosmicvent"; x.Country = "India"; }); _creditCardAttributes = ObjectMother.GetMockCreditCardAttributes(x => { x.CardNumber = "4111111111111111"; x.ExpirationDate = DateTime.Now.AddMonths(1).ToString("yyyy-MM"); }); _paymentProfileAttributes = ObjectMother.GetMockPaymentProfileAttributes(); _order = ObjectMother.GetMockOrder(x => { x.Amount = random.Next(1, 5000); x.Description = "amount of" + random.Next(1, 5000); }); // //var next = random.Next(1, 5000); //_transaction = ObjectMother.GetMockTransaction(x => //{ // x.Amount = next; // x.Description = "Transaction" + next; // x.InVoiceNumber = "IN" + next; // x.PurchaseOrderNumber = "PO" + next; // x.RecurringBilling = false; // x.TaxExempt = false; //}); }
/// <summary> /// Method for comparing one IPaymentProfileAttributes to another (by vault token) /// </summary> /// <param name="other">The other IPaymentProfileAttributes to compare with</param> /// <returns>The result of the comparison</returns> public int CompareTo(IPaymentProfileAttributes other) { return(string.Compare(VaultToken, other.VaultToken, StringComparison.InvariantCultureIgnoreCase)); }
public void Setup() { var random = new Random(); _profileAttributes = ObjectMother.GetMockProfileAttributes(x => { x.CustomerId = random.Next().ToString(); x.Email = "*****@*****.**"; x.GateWayId = "222222"; }); _addressAttributes = ObjectMother.GetMockAddressAttributes(x => { x.FirstName = "Rafi"; x.LastName = "Sk"; x.Address = "Rajendranagar"; x.City = "Hyderabad"; x.State = "AP"; x.Zip = "500048"; x.Company = "cosmicvent"; x.Country = "India"; }); _creditCardAttributes = ObjectMother.GetMockCreditCardAttributes(x => { x.CardNumber = "4111111111111111"; x.ExpirationDate = DateTime.Now.AddMonths(1).ToString("yyyy-MM"); }); _paymentProfileAttributes = ObjectMother.GetMockPaymentProfileAttributes(x => { x.GateWayId = "33333"; }); _updatePaymentProfileDictionary = new Dictionary<string, object>(); _updatePaymentProfileDictionary.Add("paymentProfileAttributes", _paymentProfileAttributes); _updatePaymentProfileDictionary.Add("profileAttributes", _profileAttributes); _updatePaymentProfileDictionary.Add("billingAddressAttributes", _addressAttributes); _updatePaymentProfileDictionary.Add("creditCardAttributes", _creditCardAttributes); }
public Response Update(IProfileAttributes profile, IAddressAttributes billingAddress, ICreditCardAttributes creditCardInfo, IPaymentProfileAttributes paymentProfileAttributes) { var updatePaymentProfileAttributes = new Dictionary<string, object>(); updatePaymentProfileAttributes.Add("profileAttributes", profile); updatePaymentProfileAttributes.Add("paymentProfileAttributes", paymentProfileAttributes); updatePaymentProfileAttributes.Add("billingAddressAttributes", billingAddress); updatePaymentProfileAttributes.Add("creditCardAttributes", creditCardInfo); return GetResponse(updatePaymentProfileAttributes, "updateCustomerPaymentProfileRequest.spark", new UpdateCustomerPaymentProfileParser()); }
public ISubscription CreateSubscriptionUsingCoupon(string ProductHandle, ICustomerAttributes CustomerAttributes, string CouponCode, DateTime NextBillingAt, IPaymentProfileAttributes ExistingProfile) { throw new NotImplementedException(); }
public void setup() { _profileAttributes = ObjectMother.GetMockProfileAttributes(x => { x.GateWayId = "123215"; }); _paymentProfileAttributes = ObjectMother.GetMockPaymentProfileAttributes(x => { x.GateWayId = "829831"; x.MaskedCreditCard = "XXXX3333"; }); _order = ObjectMother.GetMockOrder(x => { x.Amount = 100; x.Description = "First Transaction"; }); _transaction = ObjectMother.GetMockTransaction(x => { x.GateWayId = "9999999"; }); _chargeAttributes = new Dictionary<string, object>(); _chargeAttributes.Add("profile", _profileAttributes); _chargeAttributes.Add("paymentProfile", _paymentProfileAttributes); _chargeAttributes.Add("order", _order); _chargeAttributes.Add("transaction", _transaction); _chargeAttributes.Add("amount",(decimal)100); }