-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from paynl/feature/PLUG-3141
PLUG-3141 - Instore payment i.c.m. pickup in store
- Loading branch information
Showing
25 changed files
with
387 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Controller\Order; | ||
|
||
class Pickup extends \Magento\Framework\App\Action\Action | ||
{ | ||
protected $_pageFactory; | ||
|
||
/** | ||
* Pickup construct | ||
* | ||
* @param \Magento\Framework\App\Action\Context $context | ||
* @param \Magento\Framework\View\Result\PageFactory $pageFactory | ||
*/ | ||
public function __construct( | ||
\Magento\Framework\App\Action\Context $context, | ||
\Magento\Framework\View\Result\PageFactory $pageFactory | ||
) { | ||
$this->_pageFactory = $pageFactory; | ||
return parent::__construct($context); | ||
} | ||
|
||
/** | ||
* @return object | ||
*/ | ||
public function execute() | ||
{ | ||
return $this->_pageFactory->create(); | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
|
||
namespace Paynl\Payment\Model\Config\Source; | ||
|
||
use Magento\Framework\Option\ArrayInterface; | ||
|
||
class PinMoment implements ArrayInterface | ||
{ | ||
public const LOCATION_CHECKOUT = 0; | ||
public const LOCATION_PICKUP = 1; | ||
public const LOCATION_CHOICE = 2; | ||
|
||
/** | ||
* Options getter | ||
* | ||
* @return array | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
$arrOptions = $this->toArray(); | ||
|
||
$arrResult = []; | ||
foreach ($arrOptions as $value => $label) { | ||
$arrResult[] = ['value' => $value, 'label' => $label]; | ||
} | ||
return $arrResult; | ||
} | ||
|
||
/** | ||
* Get options in "key-value" format | ||
* | ||
* @return array | ||
*/ | ||
public function toArray() | ||
{ | ||
return [ | ||
'0' => __("Direct checkout payment (default)"), | ||
'1' => __("Payment takes place at the pickup location, only create a backorder"), | ||
'2' => __("Provide this choice in the checkout"), | ||
]; | ||
} | ||
} |
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
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.