Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
{ "id": "PAY-9FU876104J131673OFCA",
"create_time": "2014-09-15T12:58:48Z",
"update_time": "2014-09-15T12:59:08Z",
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"number": "xxxxxxxxxxxx0331",
"type": "visa",
"expire_month": 11,
"expire_year": 2018,
"first_name": "Joe",
"last_name": "Shopper",
"billing_address": {
"line1": "52 N Main ST",
"city": "Johnstown",
"country_code": "US",
"postal_code": "43210",
"state": "OH"
}
}
}
]
},
"transactions": [
{
"amount": {
"currency": "USD",
"total": "7.00",
"details": {
"shipping": "1.00",
"subtotal": "5.00",
"tax": "1.00"
}
},
"description": "This is the payment transaction description.",
"item_list": {
"items": [
{
"quantity": "5",
"name": "Item Name",
"price": "1.00",
"currency": "USD",
"sku": "sku"
}
]
},
"related_resources": [
{
"sale": {
"id": "6YF58894BA0554501572E",
"create_time": "2014-09-15T12:58:48Z",
"update_time": "2014-09-15T12:59:08Z",
"amount": {
"currency": "USD",
"total": "7.00"
},
"state": "completed",
"parent_payment": "PAY-9FU876104J1316703KQLOFCA",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/6YF588er94BA001572E",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/6YF58894BerA001572E/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-9F45U876104J1316703KQLOFCA",
"rel": "parent_payment",
"method": "GET"
}
]
}
}
]
}
],
"state": "approved",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-9FU876104J1316703KQLOFCA",
"rel": "self",
"method": "GET"
}
]
}
Posted
Updated 15-Sep-14 4:01am
v4

1 solution

Hi.

You can use System.Web.Script.Serialization.JavaScriptSerializer to Deserialize the JSON.
You will have to create some classes as structured as the JSON.

Hope this will help you. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900