forked from vindi/vindi-magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
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 vindi#11 from bizcommerce/master
feat: Do not allow purchases with installments greater than the plan installments
- Loading branch information
Showing
24 changed files
with
367 additions
and
185 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
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,49 @@ | ||
<?php | ||
|
||
namespace Vindi\Payment\Model\Bankslip; | ||
|
||
use Magento\Checkout\Model\ConfigProviderInterface; | ||
use Magento\Customer\Model\Session as CustomerSession; | ||
|
||
|
||
/** | ||
* Class ConfigProvider | ||
* @package Vindi\Payment\Model | ||
*/ | ||
class ConfigProvider implements ConfigProviderInterface | ||
{ | ||
/** | ||
* @var CustomerSession $customerSession | ||
*/ | ||
protected $customerSession; | ||
|
||
/** | ||
* @param CustomerSession $customerSession | ||
*/ | ||
public function __construct( | ||
CustomerSession $customerSession | ||
) { | ||
$this->customerSession = $customerSession; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getConfig() | ||
{ | ||
$customerTaxvat = ''; | ||
$customer = $this->customerSession->getCustomer(); | ||
if ($customer && $customer->getTaxvat()) { | ||
$customerTaxvat = $customer->getTaxvat(); | ||
} | ||
|
||
return [ | ||
'payment' => [ | ||
'vindi_bankslip' => [ | ||
'enabledDocument' => true, | ||
'customer_taxvat' => $customerTaxvat | ||
] | ||
] | ||
]; | ||
} | ||
} |
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.