diff --git a/src/main/Apis/Transactions/ITransactionsApi.cs b/src/main/Apis/Transactions/ITransactionsApi.cs index 04a6364..121315c 100644 --- a/src/main/Apis/Transactions/ITransactionsApi.cs +++ b/src/main/Apis/Transactions/ITransactionsApi.cs @@ -4,7 +4,7 @@ namespace PayStack.Net { public interface ITransactionsApi { - TransactionInitializeResponse Initialize(string email, int amountInKobo, string reference = null, bool makeReferenceUnique = false); + TransactionInitializeResponse Initialize(string email, int amountInKobo, string reference = null, bool makeReferenceUnique = false, string currency = "NGN"); TransactionInitializeResponse Initialize(TransactionInitializeRequest request, bool makeReferenceUnique = false); TransactionVerifyResponse Verify(string reference); TransactionListResponse List(TransactionListRequest request = null); diff --git a/src/main/Apis/Transactions/Initialize.cs b/src/main/Apis/Transactions/Initialize.cs index 60d0ab2..983cac5 100644 --- a/src/main/Apis/Transactions/Initialize.cs +++ b/src/main/Apis/Transactions/Initialize.cs @@ -22,6 +22,9 @@ public class TransactionInitializeRequest : RequestMetadataExtender [JsonProperty("transaction_charge")] public int TransactionCharge { get; set; } + [JsonProperty("currency")] + public string Currency { get; set; } = "NGN"; + public string Bearer { get; set; } } diff --git a/src/main/Apis/Transactions/TransactionsApi.cs b/src/main/Apis/Transactions/TransactionsApi.cs index 79e91d9..469ec94 100644 --- a/src/main/Apis/Transactions/TransactionsApi.cs +++ b/src/main/Apis/Transactions/TransactionsApi.cs @@ -11,8 +11,8 @@ internal TransactionsApi(PayStackApi api) _api = api; } - public TransactionInitializeResponse Initialize(string email, int amount, string reference = null, bool makeReferenceUnique = false) - => Initialize(new TransactionInitializeRequest { Reference = reference, Email = email, AmountInKobo = amount }, makeReferenceUnique); + public TransactionInitializeResponse Initialize(string email, int amount, string reference = null, bool makeReferenceUnique = false, string currency = "NGN") + => Initialize(new TransactionInitializeRequest { Reference = reference, Email = email, AmountInKobo = amount, Currency = currency }, makeReferenceUnique); public TransactionInitializeResponse Initialize(TransactionInitializeRequest request, bool makeReferenceUnique = false) {