Skip to content

Commit

Permalink
Merge pull request #58 from genecommerce/release/3.4.2
Browse files Browse the repository at this point in the history
Release/3.4.2
  • Loading branch information
Paul Canning authored Dec 9, 2019
2 parents 0e058ca + b8aa2ca commit 2ebfc10
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.4.2] - 2019-12-09
### Fixed
- Issue where Level 2/3 Processing data builder was using a string where a float was required
- Issue when trying to use a UK Maestro card to checkout

## [3.4.1] - 2019-11-20
### Fixed
- Hotfix for bug that stopped stored cards being used when CVV Re-verification is disabled
Expand Down Expand Up @@ -119,6 +124,7 @@ a bug in core Magento 2.3.1 means that if the Vault is turned off, cards are alw
### Fixed
- Vaulted cards now work correctly

[3.4.2]: https://github.com/genecommerce/module-braintree-magento2/compare/3.4.1...3.4.2
[3.4.1]: https://github.com/genecommerce/module-braintree-magento2/compare/3.4.0...3.4.1
[3.4.0]: https://github.com/genecommerce/module-braintree-magento2/compare/3.3.3...3.4.0
[3.3.3]: https://github.com/genecommerce/module-braintree-magento2/compare/3.3.2...3.3.3
Expand Down
4 changes: 2 additions & 2 deletions Gateway/Request/Level23ProcessingDataBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ public function build(array $buildSubject): array
$filteredFields['name'],
TransactionLineItem::DEBIT,
$this->numberToString($item->getQtyOrdered(), 2),
$this->numberToString($item->getPrice(), 2),
$this->numberToString($item->getBasePrice(), 2),
$filteredFields['unit_of_measure'],
$this->numberToString($item->getQtyOrdered() * $item->getPrice(), 2),
$this->numberToString($item->getQtyOrdered() * $item->getBasePrice(), 2),
$item->getTaxAmount() === null ? '0.00' : $this->numberToString($item->getTaxAmount(), 2),
$item->getTaxAmount() === null ? '0.00' : $this->numberToString($item->getDiscountAmount(), 2),
$filteredFields['sku'],
Expand Down
8 changes: 5 additions & 3 deletions Gateway/Response/CardDetailsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public function __construct(
}

/**
* @inheritdoc
* @param array $handlingSubject
* @param array $response
* @throws InputException
* @throws NoSuchEntityException
*/
public function handle(array $handlingSubject, array $response)
{
Expand All @@ -67,7 +70,6 @@ public function handle(array $handlingSubject, array $response)
$payment->setCcLast4($creditCard[self::CARD_LAST4]);
$payment->setCcExpMonth($creditCard[self::CARD_EXP_MONTH]);
$payment->setCcExpYear($creditCard[self::CARD_EXP_YEAR]);

$payment->setCcType($this->getCreditCardType($creditCard[self::CARD_TYPE]));

// set card details to additional info
Expand All @@ -83,7 +85,7 @@ public function handle(array $handlingSubject, array $response)
* @throws InputException
* @throws NoSuchEntityException
*/
private function getCreditCardType($type): string
private function getCreditCardType(string $type): string
{
$replaced = str_replace(' ', '-', strtolower($type));
$mapper = $this->config->getCcTypesMapper();
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gene/module-braintree",
"description": "Fork from the Magento Braintree 2.2.0 module by Gene Commerce for PayPal.",
"version": "3.4.1",
"version": "3.4.2",
"type": "magento2-module",
"license": "proprietary",
"require": {
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<can_deny_payment>1</can_deny_payment>
<cctypes>AE,VI,MC,DI,JCB,CUP,DN,MI</cctypes>
<useccv>1</useccv>
<cctypes_braintree_mapper><![CDATA[{"american-express":"AE","discover":"DI","jcb":"JCB","mastercard":"MC","master-card":"MC","visa":"VI","maestro":"MI","diners-club":"DN","unionpay":"CUP"}]]></cctypes_braintree_mapper>
<cctypes_braintree_mapper><![CDATA[{"american-express":"AE","discover":"DI","jcb":"JCB","mastercard":"MC","master-card":"MC","visa":"VI","maestro":"MI","uk-maestro":"MI","diners-club":"DN","unionpay":"CUP"}]]></cctypes_braintree_mapper>
<order_status>processing</order_status>
<environment>sandbox</environment>
<allowspecific>0</allowspecific>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_Braintree" setup_version="3.4.1">
<module name="Magento_Braintree" setup_version="3.4.2">
<sequence>
<module name="Magento_Customer"/>
<module name="Magento_Config"/>
Expand Down

0 comments on commit 2ebfc10

Please sign in to comment.