Skip to content

Commit

Permalink
added Card,SourceOfFunds and SourceOfFundsProvided api resources
Browse files Browse the repository at this point in the history
  • Loading branch information
aemaddin committed Oct 25, 2019
1 parent 6996990 commit e7b686e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All Notable changes to `mastercard-php` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## NEXT - 2019-10-25
- SourceOfFunds
- SourceOfFundsProvided
- Card

## NEXT - 2019-10-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.4
20 changes: 20 additions & 0 deletions lib/Card.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php


namespace Mastercard;

/**
* Class Card
*
* @property string $accountType
* @property MastercardObject $expiry
* @property string $nameOnCard
* @property string $number
* @property string $securityCode
*
* @package Mastercard
*/
class Card extends ApiResource
{
const OBJECT_NAME = 'card';
}
2 changes: 1 addition & 1 deletion lib/Mastercard.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Mastercard
const REGION_NORTH_AMERICA = 'NORTH_AMERICA';
const REGION_MTF = 'MTF';
const REGION_QA01 = 'QA01';
const VERSION = '1.0.2';
const VERSION = '1.0.4';


// @var string the api password to be used for requests.
Expand Down
19 changes: 19 additions & 0 deletions lib/SourceOfFunds.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php


namespace Mastercard;

/**
* Class sourceOfFunds
*
* @property MastercardObject $provided
* @property string $token
* @property string $tokenRequestorID
* @property string $type
*
* @package Mastercard
*/
class SourceOfFunds extends ApiResource
{
const OBJECT_NAME = 'sourceOfFunds';
}
16 changes: 16 additions & 0 deletions lib/SourceOfFundsProvided.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php


namespace Mastercard;

/**
* Class sourceOfFundsProvided
*
* @property Card $card
*
* @package Mastercard
*/
class SourceOfFundsProvided extends ApiResource
{
const OBJECT_NAME = 'provided';
}
5 changes: 4 additions & 1 deletion lib/Util/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public static function convertToMastercardObject($resp, $opts)
\Mastercard\Transaction::OBJECT_NAME => \Mastercard\Transaction::class,
\Mastercard\ThreeDS::RETURN_OBJECT_NAME => \Mastercard\ThreeDS::class,
\Mastercard\Customer::OBJECT_NAME => \Mastercard\Customer::class,
\Mastercard\Order::OBJECT_NAME => \Mastercard\Order::class
\Mastercard\Order::OBJECT_NAME => \Mastercard\Order::class,
\Mastercard\SourceOfFunds::OBJECT_NAME => \Mastercard\SourceOfFunds::class,
\Mastercard\SourceOfFundsProvided::OBJECT_NAME => \Mastercard\SourceOfFundsProvided::class,
\Mastercard\Card::OBJECT_NAME => \Mastercard\Card::class,
];
if (self::isList($resp)) {
$mapped = [];
Expand Down

0 comments on commit e7b686e

Please sign in to comment.