Skip to content
Browse files

Updating webhooks to reflect new amount and anount_minus_fees fields

  • Loading branch information...
1 parent 4c14922 commit c70a5a263328c46c83755902700390b95ca83c03 @alexjg alexjg committed Aug 29, 2012
View
10 GoCardlessSdk.Tests/WebHooks/Data/Bill.txt
@@ -9,17 +9,21 @@
"source_type": "subscription",
"source_id": "KKJ398H8K8",
"paid_at": "2011-12-01T12:01:23Z",
- "uri": "https://sandbox.gocardless.com/api/v1/bills/AKJ398H8KA"
+ "uri": "https://sandbox.gocardless.com/api/v1/bills/AKJ398H8KA",
+ "amount": "20.0",
+ "amount_minus_fees":"19.8"
},
{
"id": "AKJ398H8KB",
"status": "paid",
"source_type": "subscription",
"source_id": "8AKJ398H78",
"paid_at": "2011-12-09T23:04:56Z",
- "uri": "https://sandbox.gocardless.com/api/v1/bills/AKJ398H8KB"
+ "uri": "https://sandbox.gocardless.com/api/v1/bills/AKJ398H8KB",
+ "amount": "20.0",
+ "amount_minus_fees":"19.8"
}
],
- "signature": "7abaa876a693778e7ce6b49bbb6f39f928b5ae87bbe60455175218998a1a9448"
+ "signature": "5c5ae3507d1edb2d6da19b270a1df2b5401c91b9effc3a1ab0d56124ecbda1f0"
}
}
View
2 GoCardlessSdk.Tests/WebHooks/WebHooksTests.cs
@@ -19,7 +19,7 @@ public void Bill_InvalidSignature_ThrowsException()
public void Bill_PayloadDeserializesOk()
{
var request = File.ReadAllText("./WebHooks/Data/Bill.txt");
- GoCardless.AccountDetails.AppSecret = "test_secret";
+ GoCardless.AccountDetails.AppSecret = "E9XTYW9EJV2P4FRTDTRCTREH1PSADHBWFSM7D6W6PJ3W2S8FF6G9K25PEPXXRF9N";
var payload = WebHooksClient.ParseRequest(request);
View
2 GoCardlessSdk/WebHooks/GoCardlessRequest.cs
@@ -23,6 +23,8 @@ public class Bill
public string SourceId { get; set; }
public DateTimeOffset PaidAt { get; set; }
public string Uri { get; set; }
+ public string Amount { get; set; }
+ public string AmountMinusFees { get; set; }
}
public class PreAuthorization

0 comments on commit c70a5a2

Please sign in to comment.
Something went wrong with that request. Please try again.