-
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.
INGA-118: Add "Soft Descriptor" field (#27191)
- rename ingenico js component - add field and use it in create payment request
- Loading branch information
Showing
14 changed files
with
129 additions
and
15 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,39 @@ | ||
<?php | ||
|
||
namespace Ingenico\Connect\OroCommerce\Ingenico\Option\Payment\Order\References; | ||
|
||
use Ingenico\Connect\OroCommerce\Ingenico\Option\LengthNormalizerTrait; | ||
use Ingenico\Connect\OroCommerce\Ingenico\Option\OptionInterface; | ||
use Ingenico\Connect\OroCommerce\Ingenico\Option\OptionsResolver; | ||
|
||
/** | ||
* Option for descriptor field | ||
* | ||
* @codingStandardsIgnoreStart | ||
* @see https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/payments/create.html?paymentPlatform=ALL#payments-create-payload | ||
* @codingStandardsIgnoreEnd | ||
*/ | ||
class Descriptor implements OptionInterface | ||
{ | ||
use LengthNormalizerTrait; | ||
|
||
public const NAME = '[order][references][descriptor]'; | ||
|
||
/** | ||
* From the doc: | ||
* Note that we advise you to use 22 characters as the max length as beyond this our experience is that issuers | ||
* will start to truncate. | ||
*/ | ||
private const MAX_LENGTH = 22; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver | ||
->setDefined(self::NAME) | ||
->setAllowedTypes(self::NAME, ['string', 'null']) | ||
->setNormalizer(self::NAME, $this->getLengthNormalizer(self::MAX_LENGTH)); | ||
} | ||
} |
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,19 @@ | ||
<?php | ||
|
||
namespace Ingenico\Connect\OroCommerce\Migrations\Schema\v1_4; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Oro\Bundle\MigrationBundle\Migration\Migration; | ||
use Oro\Bundle\MigrationBundle\Migration\QueryBag; | ||
|
||
class AddSoftDescriptorField implements Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up(Schema $schema, QueryBag $queries) | ||
{ | ||
$table = $schema->getTable('oro_integration_transport'); | ||
$table->addColumn('ingenico_soft_descriptor', 'string', ['length' => 255, 'notnull' => false]); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
Resources/views/layouts/default/imports/oro_payment_method_options/layout.html.twig
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