-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjust metered billing and three d secure endpoints and added test
- Loading branch information
1 parent
8d52946
commit 233ea21
Showing
6 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
*/ | ||
class RebillyThreeDSecure | ||
{ | ||
|
||
const THREE_D_SECURE_URL = 'threeDSecure/'; | ||
/** | ||
* @var string | ||
*/ | ||
|
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,21 @@ | ||
<?php | ||
|
||
class RebillyMeteredBilling extends \Codeception\TestCase\Test | ||
{ | ||
public function testMeteredBillingPost() | ||
{ | ||
$subscription = new RebillySubscription('subscriptionId123'); | ||
$subscription->setApiKey('apiKey'); | ||
$meteredBilling = new RebillyMeteredBilling(); | ||
$meteredBilling->itemId = 'abc1'; | ||
$meteredBilling->type = 'debit'; | ||
$meteredBilling->amount = '9.99'; | ||
$meteredBilling->quantity = 1; | ||
$meteredBilling->description = 'Test widget'; | ||
|
||
$subscription->meteredBilling = array($meteredBilling); | ||
|
||
expect($subscription->buildRequest($subscription)) | ||
->equals('{"lookupSubscriptionId":"subscriptionId123","meteredBilling":[{"itemId":"abc1","type":"debit","amount":"9.99","quantity":1,"description":"Test widget"}]}'); | ||
} | ||
} |
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