需要知道如何传递paypal交易的模型

时间:2014-11-19 11:41:20

标签: asp.net-mvc-3 paypal

我有一个简单的订单表格,我在mvc中创建,当他们点击提交按钮时,我让用户重定向到paypal付款,然后他们被重定向回原始页面。我试图找出如何传递模型信息或以某种方式保存它,因为付款完成后,我的程序会向他们发送一封电子邮件,上面有他们的收据和成功购买的副本。我该怎么做呢?如果您还需要查看其他内容,请与我们联系。我仍然是MVC的新手,我试图弄明白这一切。

模型

public class WritingAppModel
{
    [Required(ErrorMessage = "Name is required")]
    public string Name { get; set; }

    [EmailAddress(ErrorMessage = "A Valid Email Address is Required.")]
    [Required(ErrorMessage = "Email Address is Required.")]
    public string Email { get; set; }

    [Phone(ErrorMessage = "A Valid Phone Number is Required.")]
    [Required(ErrorMessage = "Phone Number is Required.")]
    public string PhoneNumber { get; set; }

    [Required(ErrorMessage = "Subject is Required.")]
    public string Subject { get; set; }

    [Required(ErrorMessage = "Topic is Required.")]
    public string Topic { get; set; }

    [Required(ErrorMessage = "Document Type is Required.")]
    public string DocumentType { get; set; }

    [Required(ErrorMessage = "Urgency is Required.")]
    public string Urgency { get; set; }

    [Required(ErrorMessage = "Number of Pages is Required.")]
    public Int16 NumberOfPages { get; set; }

    [Required(ErrorMessage = "Requirements are Required.")]
    [DataType(DataType.MultilineText)]
    [StringLength(200)]
    public string Requirements { get; set; }

    [Required(ErrorMessage = "Writing Style is Required.")]
    public string Style { get; set; }

    [Required(ErrorMessage = "Spacing is Required.")]
    public string Spacing { get; set; }

    [Required(ErrorMessage = "Academic Level is Required.")]
    public string AcademicLevel { get; set; }

    [Required(ErrorMessage = "Number of Sources is Required.")]
    public Int16 NumberOfSources { get; set; }

    [Required(ErrorMessage = "Price is Required.")]
    [Range(0.01, 10000.00, ErrorMessage = "Your quote is not complete because you haven't completed all of the steps.")]
    [DataType(DataType.Currency)]
    [DisplayFormat(DataFormatString = "{0:C}")]
    public decimal Price { get; set; }

    public string UnFormattedPrice
    {
        get
        {
            return this.Price.ToString();
        }
    }

    [Required(ErrorMessage = "Currency is Required.")]
    public string Currency { get; set; }
}

0 个答案:

没有答案