-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Flutterwave/master
update features and docs from FLW
- Loading branch information
Showing
5 changed files
with
118 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
#### Description | ||
<!--- Describe your changes in detail --> | ||
|
||
#### Related Issue | ||
<!--- This project only accepts pull requests related to open issues --> | ||
<!--- If suggesting a new feature or change, please discuss it in an issue first --> | ||
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> | ||
<!--- Please link to the issue here: --> | ||
|
||
#### Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
|
||
#### How Has This Been Tested? | ||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, and the tests you ran to --> | ||
<!--- see how your change affects other areas of the code, etc. --> | ||
|
||
#### Types of changes | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] Refactor (non-breaking change which improves implementation) | ||
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
- [ ] Non-functional change (xml comments/documentation/etc) | ||
|
||
#### Checklist: | ||
<!--- The following is a checklist of items that MUST be completed before a PR is accepted --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
- [ ] My code follows the code style of this project. | ||
- [ ] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md). | ||
- [ ] I have added tests to cover my changes. <!--- If not applicable, please explain why --> | ||
- [ ] All new and existing tests passed. | ||
- [ ] My branch follows the naming convention `bug-<issue#>-<description>` or `feature-<issue#>-<description>` | ||
|
||
|
||
@Flutterwave/Corvus97 What do you think about these updates? |
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
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 |
---|---|---|
|
@@ -30,6 +30,7 @@ public class UnitTest1 | |
string ScKey = Environment.GetEnvironmentVariable("ScKey"); | ||
|
||
|
||
//Preauth Card charge test | ||
[TestMethod] | ||
public void preauthTest() | ||
{ | ||
|
@@ -54,7 +55,35 @@ public void preauthTest() | |
|
||
|
||
} | ||
|
||
//Noauth Card charge test | ||
[TestMethod] | ||
public void avschargetest() | ||
{ | ||
var raveConfig = new RaveConfig(PbKey, ScKey, false); | ||
var cardCharge = new ChargeCard(raveConfig); | ||
var card = new Card("5377283645077450", "09", "21", "789"); | ||
|
||
var payload = new CardParams(PbKey, ScKey, "Anonymous", "Tester", "[email protected]", 200, "USD", card, "07205", "Hillside", "470 Mundet PI", "NJ", "US"); | ||
|
||
var res = cardCharge.Charge(payload).Result; | ||
|
||
try | ||
{ | ||
Assert.IsNotNull(res.Data); | ||
Console.WriteLine(res.Data); | ||
Assert.AreEqual("success", res.Status); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine(ex.ToString()); | ||
} | ||
|
||
|
||
} | ||
|
||
|
||
//Mobile money charge test | ||
[TestMethod] | ||
public void mobileMoneyTest() | ||
{ | ||
|
@@ -77,6 +106,7 @@ public void mobileMoneyTest() | |
} | ||
} | ||
|
||
//Account charge test | ||
[TestMethod] | ||
public void accountTest() | ||
{ | ||
|
@@ -99,6 +129,7 @@ public void accountTest() | |
} | ||
|
||
|
||
//Subaccount creation test | ||
[TestMethod] | ||
public void CreateSubAccountTest() | ||
{ | ||
|
@@ -112,6 +143,7 @@ public void CreateSubAccountTest() | |
Assert.AreEqual("error", chargeResponse.Status); | ||
} | ||
|
||
//Tokenized Card charge test suite | ||
[TestMethod] | ||
public void TokenTest() | ||
{ | ||
|
@@ -140,6 +172,7 @@ public void TokenTest() | |
|
||
} | ||
|
||
|
||
[TestMethod] | ||
public void VirtualStaticAccountTest() | ||
{ | ||
|
@@ -215,6 +248,7 @@ public void UpdateEbillsTest() | |
Assert.AreEqual("success", (string)json.SelectToken("status")); | ||
} | ||
|
||
//Subscription list test | ||
[TestMethod] | ||
public void ListSubscriptions() | ||
{ | ||
|
@@ -229,6 +263,7 @@ public void ListSubscriptions() | |
Assert.AreEqual("success", (string)json.SelectToken("status")); | ||
} | ||
|
||
//Virtual Card creation test | ||
[TestMethod] | ||
public void CreateVirtualCard() | ||
{ | ||
|