Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.8.2 #17

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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).

## [1.8.2] - 2024-05-27
### Fixed
- Fixed intermittent error when saving payment details

## [1.8.1] - 2024-04-25
### Fixed
- Fix added existing value validation for the financial_institution field
Expand Down
8 changes: 4 additions & 4 deletions Model/Api/CreateVaultManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ public function createVault(
if ($createUser[self::RESULT_CODE] === 0) {
unset($token);
$mpUserId = $this->findUser($storeId, $quote);
$mpCustomerId = $mpUserId[self::USER_ID];
$mpCustomerId = isset($mpUserId[self::USER_ID]) ? $mpUserId[self::USER_ID] : "";
}

if ($createUser[self::RESULT_CODE] === 1) {
unset($token);
unset($vaultData['identificationNumber']);
$mpCustomerId = $createUser[self::USER_ID];
$mpCustomerId = isset($createUser[self::USER_ID]) ? $createUser[self::USER_ID] : "";
}

$saveCcNumber = $this->saveCcNumber($storeId, $mpCustomerId, $vaultData);
$token['tokenize'] = [
self::USER_ID => $mpCustomerId,
self::CARD_ID => $saveCcNumber[self::CARD_ID],
self::CARD_ID => isset($saveCcNumber[self::CARD_ID]) ? $saveCcNumber[self::CARD_ID] : "",
];

return $token;
Expand All @@ -159,7 +159,7 @@ public function createUser($storeId, $quote, $vaultData): array
'last_name' => $quote->getCustomerLastName(),
'identification' => [
'type' => $vaultData['identificationType'],
'number' => $vaultData['identificationNumber'],
'number' => isset($vaultData['identificationNumber']) ? $vaultData['identificationNumber'] : "",
],
];

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": "mercadopago/adb-payment",
"description": "MercadoPago - Payment for Adobe Commerce",
"version": "1.8.1",
"version": "1.8.2",
"require": {
"php": "~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0",
"ext-json": "*",
Expand Down
Loading
Loading