making pay, & refactoring
This commit is contained in:
parent
8b5e50626e
commit
3e6ac9aba7
34 changed files with 602 additions and 215 deletions
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";
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue