-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve ChargeAuthorization 'Reference' flow
* Implements CheckAuthorization/RequestReauthorization for Transations
- Loading branch information
1 parent
fb06aaa
commit 6e10c13
Showing
5 changed files
with
130 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace PayStack.Net | ||
{ | ||
public class CheckAuthorizationRequest | ||
{ | ||
|
||
[JsonProperty("authorization_code")] | ||
public string AuthorizationCode { get; set; } | ||
|
||
public string Currency { get; set; } | ||
|
||
[JsonProperty("amount")] | ||
public int AmountInKobo { get; set; } | ||
|
||
public string Email { get; set; } | ||
|
||
} | ||
|
||
public class CheckAuthorizationResponse : HasRawResponse | ||
{ | ||
[JsonProperty("status")] | ||
public bool Status { get; set; } | ||
|
||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
|
||
[JsonProperty("data")] | ||
public CheckAuthorizationData Data { get; set; } | ||
} | ||
|
||
public class CheckAuthorizationData | ||
{ | ||
[JsonProperty("amount")] | ||
public string AmountInKobo { get; set; } | ||
public string Currency { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace PayStack.Net | ||
{ | ||
public class ReAuthorizationRequest : RequestMetadataExtender | ||
{ | ||
public string Reference { get; set; } | ||
|
||
[JsonProperty("authorization_code")] | ||
public string AuthorizationCode { get; set; } | ||
|
||
public string Currency { get; set; } | ||
|
||
[JsonProperty("amount")] | ||
public int AmountInKobo { get; set; } | ||
|
||
public string Email { get; set; } | ||
} | ||
|
||
public class ReAuthorizationResponse : HasRawResponse | ||
{ | ||
[JsonProperty("status")] | ||
public bool Status { get; set; } | ||
|
||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
|
||
[JsonProperty("data")] | ||
public ReAuthorizationData Data { get; set; } | ||
} | ||
|
||
public class ReAuthorizationData { | ||
[JsonProperty("reauthorization_url")] | ||
public string ReAuthorizationUrl { get; set; } | ||
|
||
public string Reference { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters