-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: Card pre-authorization (with PayIn), ...
PayInBankWire, get user cards & transactions, new type of documents for KYC
- Loading branch information
1 parent
de7826e
commit 798c941
Showing
17 changed files
with
567 additions
and
49 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,123 @@ | ||
<?php | ||
namespace MangoPay; | ||
|
||
/** | ||
* Pre-authorization entity | ||
*/ | ||
class CardPreAuthorization extends EntityBase { | ||
|
||
/** | ||
* The user Id of the author of the pre-authorization | ||
* @var string | ||
*/ | ||
public $AuthorId; | ||
|
||
/** | ||
* It represents the amount debited on the bank account | ||
* of the Author.DebitedFunds = Fees + CreditedFunds | ||
* (amount received on wallet) | ||
* @var \MangoPay\Money | ||
*/ | ||
public $DebitedFunds; | ||
|
||
/** | ||
* Status of the PreAuthorization: CREATED, SUCCEEDED, FAILED | ||
* @var string | ||
*/ | ||
public $Status; | ||
|
||
/** | ||
* The status of the payment after the PreAuthorization: | ||
* WAITING, CANCELED, EXPIRED, VALIDATED | ||
* @var string | ||
*/ | ||
public $PaymentStatus; | ||
|
||
/** | ||
* The PreAuthorization result code | ||
* @var string | ||
*/ | ||
public $ResultCode; | ||
|
||
/** | ||
* The PreAuthorization result Message explaining the result code | ||
* @var string | ||
*/ | ||
public $ResultMessage; | ||
|
||
/** | ||
* How the PreAuthorization has been executed. | ||
* Only on value for now: CARD | ||
* @var string | ||
*/ | ||
public $ExecutionType; | ||
|
||
/** | ||
* The SecureMode correspond to '3D secure' for CB Visa and MasterCard | ||
* or 'Amex Safe Key' for American Express. | ||
* This field lets you activate it manualy. | ||
* @var string | ||
*/ | ||
public $SecureMode; | ||
|
||
/** | ||
* The ID of the registered card (Got through CardRegistration object) | ||
* @var string | ||
*/ | ||
public $CardId; | ||
|
||
/** | ||
* Boolean. The value is 'true' if the SecureMode was used | ||
* @var string | ||
*/ | ||
public $SecureModeNeeded; | ||
|
||
/** | ||
* This is the URL where to redirect users to proceed | ||
* to 3D secure validation | ||
* @var string | ||
*/ | ||
public $SecureModeRedirectUrl; | ||
|
||
/** | ||
* This is the URL where users are automatically redirected | ||
* after 3D secure validation (if activated) | ||
* @var string | ||
*/ | ||
public $SecureModeReturnURL; | ||
|
||
/** | ||
* The date when the payment is processed | ||
* @var Timestamp | ||
*/ | ||
public $ExpirationDate; | ||
|
||
/** | ||
* The Id of the associated PayIn | ||
* @var string | ||
*/ | ||
public $PayInId; | ||
|
||
/** | ||
* Get array with mapping which property is object and what type of object | ||
* @return array | ||
*/ | ||
public function GetSubObjects() { | ||
return array( | ||
'DebitedFunds' => '\MangoPay\Money' | ||
); | ||
} | ||
|
||
/** | ||
* Get array with read-only properties | ||
* @return array | ||
*/ | ||
public function GetReadOnlyProperties() { | ||
$properties = parent::GetReadOnlyProperties(); | ||
array_push( $properties, 'Status' ); | ||
array_push( $properties, 'ResultCode' ); | ||
array_push( $properties, 'ResultMessage' ); | ||
|
||
return $properties; | ||
} | ||
} |
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
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,35 @@ | ||
<?php | ||
namespace MangoPay; | ||
|
||
/** | ||
* Class to management MangoPay API for pre-authorization process | ||
*/ | ||
class ApiCardPreAuthorizations extends ApiBase { | ||
|
||
/** | ||
* Create new pre-authorization object | ||
* @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to create | ||
* @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API | ||
*/ | ||
public function Create($cardPreAuthorization) { | ||
return $this->CreateObject('preauthorization_create', $cardPreAuthorization, '\MangoPay\CardPreAuthorization'); | ||
} | ||
|
||
/** | ||
* Get pre-authorization object | ||
* @param int $cardPreAuthorizationId PreAuthorization identifier | ||
* @return \MangoPay\CardPreAuthorization Card registration object returned from API | ||
*/ | ||
public function Get($cardPreAuthorizationId) { | ||
return $this->GetObject('preauthorization_get', $cardPreAuthorizationId, '\MangoPay\CardPreAuthorization'); | ||
} | ||
|
||
/** | ||
* Update pre-authorization object | ||
* @param \MangoPay\CardPreAuthorization $preAuthorization PreAuthorization object to save | ||
* @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API | ||
*/ | ||
public function Update($cardPreAuthorization) { | ||
return $this->SaveObject('preauthorization_save', $cardPreAuthorization, '\MangoPay\CardPreAuthorization'); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
namespace MangoPay; | ||
|
||
/** | ||
* Class represents BankWire type for mean of payment in PayIn entity | ||
*/ | ||
class PayInPaymentDetailsBankWire extends Dto implements PayInPaymentDetails { | ||
|
||
/** | ||
* Declared debited funds | ||
* @var \MangoPay\Money | ||
*/ | ||
public $DeclaredDebitedFunds; | ||
|
||
/** | ||
* Declared fees | ||
* @var \MangoPay\Money | ||
*/ | ||
public $DeclaredFees; | ||
|
||
/** | ||
* Bank account details | ||
* @var \MangoPay\BankAccount | ||
*/ | ||
public $BankAccount; | ||
|
||
/** | ||
* Wire reference | ||
* @var string | ||
*/ | ||
public $WireReference; | ||
|
||
/** | ||
* Get array with mapping which property is object and what type of object | ||
* @return array | ||
*/ | ||
public function GetSubObjects() { | ||
return array( | ||
'DeclaredDebitedFunds' => '\MangoPay\Money' , | ||
'DeclaredFees' => '\MangoPay\Money' , | ||
'BankAccount' => '\MangoPay\BankAccount' | ||
); | ||
} | ||
} |
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
Oops, something went wrong.