Skip to content

Commit

Permalink
Fix giftcards results
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivascu Madalin committed Sep 19, 2023
1 parent a911f73 commit 6bd49a9
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Magewire/Payment/Method/Giftcards.php
Original file line number Diff line number Diff line change
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
Empty file added i18n/de_DE.csv
Empty file.
Empty file added i18n/es_ES.csv
Empty file.
Empty file added i18n/fr_FR.csv
Empty file.
Empty file added i18n/nl_BE.csv
Empty file.
7 changes: 7 additions & 0 deletions i18n/nl_NL.csv
Original file line number Diff line number Diff line change
@@ -0,0 +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"
"Voucher code:","Voucher code:"
2 changes: 0 additions & 2 deletions view/frontend/templates/component/payment/before.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}

buckaroo_load_sdk().then(() => {

hyva.formValidation.addRule('bk-validateCardNumber', (value) => {
if (!BuckarooClientSideEncryption.V001.validateCardNumber(value.replace(/\s+/g, ''))) {
return '<?= $escaper->escapeJs(__('Please enter a valid creditcard number.')) ?>';
Expand Down Expand Up @@ -94,7 +93,6 @@
},
initModal() {
window.addEventListener('buckaroo-modal-show', (event) => {
console.log(event);
if(event.detail.data) {
this.showModal = true;
Object.keys(event.detail.data).forEach((key) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ if (!$magewire->isRedirect()) {
},
listenToSubmit() {
this.$wire.on('giftcard_response', async (response) => {
console.log(response);
if (response.error) {
this.displayError(response.error);
} else if(response.remainder_amount === undefined) {
Expand Down

1 comment on commit 6bd49a9

@Buckaroo-Rene
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For our reference: BP-2947

Please sign in to comment.