-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,587 additions
and
1,351 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
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,4 @@ | ||
{ | ||
"trailingComma": "none", | ||
"singleQuote": true | ||
} |
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
57 changes: 57 additions & 0 deletions
57
src/hipay_enterprise/classes/apiFormatter/Request/AvailablePaymentProductFormatter.php
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,57 @@ | ||
<?php | ||
/** | ||
* HiPay Enterprise SDK Prestashop | ||
* | ||
* 2017 HiPay | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* @author HiPay <[email protected]> | ||
* @copyright 2017 HiPay | ||
* @license https://github.com/hipay/hipay-enterprise-sdk-prestashop/blob/master/LICENSE.md | ||
*/ | ||
|
||
require_once(dirname(__FILE__) . '/CommonRequestFormatterAbstract.php'); | ||
require_once(dirname(__FILE__) . '/../../../lib/vendor/autoload.php'); | ||
|
||
/** | ||
* | ||
* Available payment product formatter | ||
* | ||
* @author HiPay <[email protected]> | ||
* @copyright Copyright (c) 2017 - HiPay | ||
* @license https://github.com/hipay/hipay-enterprise-sdk-prestashop/blob/master/LICENSE.md | ||
* @link https://github.com/hipay/hipay-enterprise-sdk-prestashop | ||
*/ | ||
class AvailablePaymentProductFormatter extends CommonRequestFormatterAbstract | ||
{ | ||
public function __construct($moduleInstance, $params, $cart = false) | ||
{ | ||
parent::__construct($moduleInstance, $cart); | ||
$this->params = $params; | ||
} | ||
|
||
/** | ||
* generate request data before API call | ||
* @return \HiPay\Fullservice\Gateway\Request\Info\AvailablePaymentProductRequest | ||
*/ | ||
public function generate() | ||
{ | ||
$paymentProduct = new \HiPay\Fullservice\Gateway\Request\Info\AvailablePaymentProductRequest(); | ||
|
||
$this->mapRequest($paymentProduct); | ||
|
||
return $paymentProduct; | ||
} | ||
|
||
/** | ||
* map prestashop Payment Product to request fields (Available Payment Product) | ||
* @param type $paymentProduct | ||
*/ | ||
protected function mapRequest(&$paymentProduct) | ||
{ | ||
parent::mapRequest($paymentProduct); | ||
$paymentProduct->payment_product = $this->params["payment_product"]; | ||
$paymentProduct->with_options = $this->params["with_options"]; | ||
} | ||
} |
92 changes: 0 additions & 92 deletions
92
src/hipay_enterprise/classes/helper/HipayAvailablePaymentProducts.php
This file was deleted.
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
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.