making pay, & refactoring
This commit is contained in:
@ -1,24 +1,35 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
|
||||
public class DoDirectCreditViewModel {
|
||||
[Required]
|
||||
public string PaymentType { get; set;}
|
||||
[Required]
|
||||
public string PayerName { get; set;}
|
||||
[Required]
|
||||
public string FirstName { get; set;}
|
||||
[Required]
|
||||
public string LastName { get; set;}
|
||||
[Required]
|
||||
public string CreditCardNumber { get; set;}
|
||||
public string CreditCardType { get; set;}
|
||||
public string Cvv2Number { get; set;}
|
||||
public string CardExpiryDate { get; set;}
|
||||
public string IpnNotificationUrl { get; set; }
|
||||
[Required]
|
||||
public string Street1 { get; set; }
|
||||
public string Street2 { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string Country { get; set; }
|
||||
[Required]
|
||||
public string PostalCode { get; set; }
|
||||
public string Phone { get; set; }
|
||||
[Required]
|
||||
public string CurrencyCode { get; set; }
|
||||
[Required]
|
||||
public string Amount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
Yavsc/ViewModels/Manage/SetAddressViewModel.cs
Normal file
16
Yavsc/ViewModels/Manage/SetAddressViewModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class SetAddressViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Street1 { get; set; }
|
||||
public string Street2 { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string Country { get; set; }
|
||||
[Required]
|
||||
public string PostalCode { get; set; }
|
||||
}
|
||||
}
|
26
Yavsc/ViewModels/PayPal/Amount.cs
Normal file
26
Yavsc/ViewModels/PayPal/Amount.cs
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
namespace Yavsc.ViewModels.PayPal
|
||||
{
|
||||
public class Amount
|
||||
{
|
||||
public string total { get; set; }
|
||||
public string currency { get; set; } = "EUR";
|
||||
public class Details
|
||||
{
|
||||
public string subtotal { get; set; }
|
||||
public string shipping { get; set; }
|
||||
public string tax { get; set; }
|
||||
public string shipping_discount { get; set; }
|
||||
|
||||
}
|
||||
public Details details;
|
||||
public class ItemList
|
||||
{
|
||||
public Item[] items;
|
||||
public string description { get; set; }
|
||||
public string invoice_number { get; set; }
|
||||
public string custom { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
22
Yavsc/ViewModels/PayPal/CreatePaymentRequest.cs
Normal file
22
Yavsc/ViewModels/PayPal/CreatePaymentRequest.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.PayPal
|
||||
{
|
||||
public class CreatePaymentRequest
|
||||
{
|
||||
[Required]
|
||||
public string intent { get; set; } = "sale"; // sale,
|
||||
public string experience_profile_id { get; set; }
|
||||
public class RedirectUrls
|
||||
{
|
||||
public string return_url { get; set; } = "";
|
||||
public string cancel_url { get; set; }
|
||||
}
|
||||
public RedirectUrls redirect_urls;
|
||||
public class Payer
|
||||
{
|
||||
public string payment_method { get; set; } = "paypal";
|
||||
}
|
||||
Payer payer;
|
||||
}
|
||||
}
|
14
Yavsc/ViewModels/PayPal/PayPalItem.cs
Normal file
14
Yavsc/ViewModels/PayPal/PayPalItem.cs
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
namespace Yavsc.ViewModels.PayPal
|
||||
{
|
||||
public class Item
|
||||
{
|
||||
public string quantity { get; set; }
|
||||
public string name { get; set; }
|
||||
public string price { get; set; }
|
||||
public string currency { get; set; } = "EUR";
|
||||
public string description { get; set; }
|
||||
public string tax { get; set; } = "1";
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user