This is how I work right now to build up membership on the website via paypal.
I would like to get done like that here:
"plan": {
"id": "P-rtfhfedh",
"state": "ACTIVE",
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"type": "FIXED",
"payment_definitions": [
{
"id": "PD-50606817NF8063316RWBZEUA",
"name": "Regular Payments",
"type": "REGULAR",
"frequency": "Month",
"amount": {
"currency": "USD",
"value": "100"
}
}
]
What I have done than to now in my MVC site it is like this:
int orderid = Convert.ToInt32(HelperClass.Helper.Settings.NyTal(8));
JsonPaypal jsonpaypal = new JsonPaypal();
jsonpaypal.IdValue = id + orderid;
jsonpaypal.Name = "Medlemskab";
jsonpaypal.description = "Medlemskab - Orderid: " + orderid;
jsonpaypal.start_date = DateTime.Now;
jsonpaypal.Plan = new string[] {
"id:" Convert.ToString(id + orderid),
"State": "ACTIVE",
};
Class to JsonPaypal
public class JsonPaypal
{
public int IdValue
{
get; set;
}
public string Name
{
get; set;
}
public string description
{
get; set;
}
public DateTime start_date
{
get; set;
}
public string payerURL
{
get; set;
}
public string Plan
{
get; set;
}
public string URL
{
get; set;
}
public string Obj
{
get; set;
}
}
The problem is when I go into my plan and make multiple object which will also be shown from the code paypal made.
The fault lies as said by Plan.