-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementación de devolución de comisiones.
- Loading branch information
Federico Balderas
committed
Nov 17, 2017
1 parent
020fe1e
commit 56ea0d9
Showing
1 changed file
with
32 additions
and
20 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 |
---|---|---|
@@ -1,30 +1,42 @@ | ||
<?php | ||
<?php | ||
|
||
/** | ||
* Openpay API v1 Client for PHP (version 1.0.0) | ||
* | ||
* Copyright © Openpay SAPI de C.V. All rights reserved. | ||
* http://www.openpay.mx/ | ||
* soporte@openpay.mx | ||
*/ | ||
class OpenpayFee extends OpenpayApiResourceBase | ||
{ | ||
|
||
protected $authorization; | ||
protected $creation_date; | ||
protected $currency; | ||
protected $operation_type; | ||
protected $status; | ||
protected $transaction_type; | ||
protected $error_message; | ||
protected $method; | ||
protected $derivedResources = array('Refund' => null); | ||
|
||
public function refund($params) { | ||
$resource = $this->derivedResources['refunds']; | ||
if ($resource) { | ||
return parent::_create($resource->resourceName, $params, array('parent' => $this)); | ||
} | ||
} | ||
|
||
} | ||
|
||
// ---------------------------------------------------------------------------- | ||
class OpenpayFeeList extends OpenpayApiDerivedResource | ||
{ | ||
|
||
public function create($params) { | ||
return $this->add($params); | ||
} | ||
|
||
class OpenpayFee extends OpenpayApiResourceBase { | ||
protected $authorization; | ||
protected $creation_date; | ||
protected $currency; | ||
protected $operation_type; | ||
protected $status; | ||
protected $transaction_type; | ||
protected $error_message; | ||
protected $method; | ||
} | ||
// ---------------------------------------------------------------------------- | ||
class OpenpayFeeList extends OpenpayApiDerivedResource { | ||
public function create($params) { | ||
return $this->add($params); | ||
} | ||
public function get($params) { | ||
// TODO: throw exception | ||
return null; | ||
} | ||
} | ||
|
||
?> |