Skip to content

Commit

Permalink
fix giftcards, add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivascu Madalin committed Oct 31, 2023
1 parent 874b489 commit a75fc76
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Magewire/Payment/Method/Giftcards.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function evaluateCompletion(EvaluationResultFactory $resultFactory): Eval
if ($this->canSubmit === false) {
return $resultFactory->createErrorMessageEvent()
->withCustomEvent('payment:method:error')
->withMessage('Cannot complete payment with voucher');
->withMessage('Cannot complete payment with giftcards');
}

return $resultFactory->createSuccess();
Expand Down Expand Up @@ -142,10 +142,10 @@ public function applyGiftcard(
$quote,
$this->buildGiftcardRequest($quote, $card, $cardNumber, $pin)->send()
);
$this->emit("giftcard_response", [$response]);
$this->emit("giftcard_response", $response);
} catch (\Throwable $th) {
$this->logger->addDebug((string)$th);
$this->emit("giftcard_response", [["error" => __('Cannot apply giftcard')]]);
$this->emit("giftcard_response", ["error" => __('Cannot apply giftcard')]);
}
}

Expand Down
7 changes: 7 additions & 0 deletions i18n/fr_FR.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"MM/YY","MM/AA"
"Expiration:","Expiration :"
"Billing Middle Name:","Deuxième prénom (facturation):"
"Select giftcard issuer:","Sélectionner l'émetteur de la carte-cadeau:"
"PIN / Security code:","Code PIN / Code de sécurité:"
"Please select issuer","Veuillez sélectionner l'émetteur:"
"Voucher code:","Code du bon d'achat:"
7 changes: 7 additions & 0 deletions i18n/nl_BE.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"MM/YY","MM/JJ"
"Expiration:","Vervaldatum:"
"Billing Middle Name:","Tussenvoegsel voor facturatienaam:"
"Select giftcard issuer:","Selecteer Cadeaukaart:"
"PIN / Security code:","PIN-/beveiligingscode:"
"Please select issuer","Selecteer de uitgever"
"Voucher code:","Voucher code:"
10 changes: 5 additions & 5 deletions i18n/nl_NL.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"MM/YY","MM/JJ"
"Expiration:","Expiration:"
"Billing Middle Name:","Billing Middle Name:"
"Select giftcard issuer:","Select giftcard issuer:"
"PIN / Security code:","PIN / Security code:"
"Please select issuer","Please select issuer"
"Expiration:","Vervaldatum:"
"Billing Middle Name:","Tussenvoegsel voor facturatienaam:"
"Select giftcard issuer:","Selecteer Cadeaukaart:"
"PIN / Security code:","PIN-/beveiligingscode:"
"Please select issuer","Selecteer de uitgever"
"Voucher code:","Voucher code:"

0 comments on commit a75fc76

Please sign in to comment.