diff --git a/Controller/Adminhtml/BayonetBlocklist/ListAction.php b/Controller/Adminhtml/BayonetBlocklist/ListAction.php
index 8377121..2bb28c4 100644
--- a/Controller/Adminhtml/BayonetBlocklist/ListAction.php
+++ b/Controller/Adminhtml/BayonetBlocklist/ListAction.php
@@ -77,7 +77,7 @@ public function execute()
$resultBlock->reason_code,
$resultBlock->reason_message
);
- $this->messageManager->addSuccess(__('Customer added to blocklist'));
+ $this->messageManager->addSuccess(__('Email added to blocklist'));
return $resultRedirect->setPath('*/*/');
} else {
$this->messageManager->addError(__(
@@ -101,7 +101,7 @@ public function execute()
$resultBlock->reason_code,
$resultBlock->reason_message
);
- $this->messageManager->addSuccess(__('Customer removed from blocklist'));
+ $this->messageManager->addSuccess(__('Email removed from blocklist'));
return $resultRedirect->setPath('*/*/');
} else {
$this->messageManager->addError(__(
@@ -123,7 +123,7 @@ public function execute()
);
$resultWhite = $this->addWhite($requestBody);
if (isset($resultWhite) && (int)$resultWhite->reason_code === 0) {
- $this->messageManager->addSuccess(__('Customer added to whitelist'));
+ $this->messageManager->addSuccess(__('Email added to whitelist'));
$this->updateListRow(
$blocklistId,
1,
@@ -154,7 +154,7 @@ public function execute()
$resultWhite->reason_code,
$resultWhite->reason_message
);
- $this->messageManager->addSuccess(__('Customer removed from whitelist'));
+ $this->messageManager->addSuccess(__('Email removed from whitelist'));
return $resultRedirect->setPath('*/*/');
} else {
$this->messageManager->addError(__(
diff --git a/Model/BayonetOrder.php b/Model/BayonetOrder.php
index 081358f..02c6ddb 100644
--- a/Model/BayonetOrder.php
+++ b/Model/BayonetOrder.php
@@ -19,6 +19,9 @@ class BayonetOrder extends AbstractModel
const API_MODE_SANDBOX = 0;
const API_MODE_LIVE = 1;
+ const DECISION_ACCEPT = 'accept';
+ const DECISION_REVIEW = 'review';
+ const DECISION_DECLINE = 'decline';
public function __construct(
Context $context,
@@ -69,4 +72,18 @@ public function getAvailableApiModes()
{
return [self::API_MODE_SANDBOX => __('Sandbox (test)'), self::API_MODE_LIVE => __('Live (production)')];
}
+
+ /**
+ * Prepares available decisions for the listing grid
+ *
+ * @return array
+ */
+ public function getAvailableDecisions()
+ {
+ return [
+ self::DECISION_ACCEPT => __('ACCEPT'),
+ self::DECISION_REVIEW => __('REVIEW'),
+ self::DECISION_DECLINE => __('DECLINE')
+ ];
+ }
}
diff --git a/Model/BayonetOrder/Source/Decision.php b/Model/BayonetOrder/Source/Decision.php
new file mode 100644
index 0000000..de96a5e
--- /dev/null
+++ b/Model/BayonetOrder/Source/Decision.php
@@ -0,0 +1,38 @@
+bayonetOrder = $bayonetOrder;
+ }
+
+ /**
+ * Get options
+ *
+ * @return array
+ */
+ public function toOptionArray()
+ {
+ $availableOptions = $this->bayonetOrder->getAvailableDecisions();
+ $options = [];
+ foreach ($availableOptions as $key => $value) {
+ $options[] = [
+ 'label' => $value,
+ 'value' => $key,
+ ];
+ }
+ return $options;
+ }
+}
diff --git a/composer.json b/composer.json
index aa72403..7d2c0ee 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
"magento/framework": "100.1.*|101.0.*|102.0.*|103.0.*"
},
"type": "magento2-module",
- "version": "1.0.4",
+ "version": "1.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/i18n/en_US.csv b/i18n/en_US.csv
index 6212289..d9822b5 100644
--- a/i18n/en_US.csv
+++ b/i18n/en_US.csv
@@ -1,12 +1,12 @@
"Bayonet Anti-Fraud","Bayonet Anti-Fraud"
"Bayonet Anti-Fraud Blocklist/Whitelist","Bayonet Anti-Fraud Blocklist/Whitelist"
-"Customer added to blocklist","Customer added to blocklist"
+"Email added to blocklist","Email added to blocklist"
"An error ocurred while trying to add to the blocklist. Please try again","An error ocurred while trying to add to the blocklist. Please try again"
-"Customer removed from blocklist","Customer removed from blocklist"
+"Email removed from blocklist","Email removed from blocklist"
"An error ocurred while trying to remove from the blocklist. Please try again","An error ocurred while trying to remove from the blocklist. Please try again"
-"Customer added to whitelist","Customer added to whitelist"
+"Email added to whitelist","Email added to whitelist"
"An error ocurred while trying to add to the whitelist. Please try again","An error ocurred while trying to add to the whitelist. Please try again"
-"Customer removed from whitelist","Customer removed from whitelist"
+"Email removed from whitelist","Email removed from whitelist"
"An error ocurred while trying to remove from the whitelist. Please try again","An error ocurred while trying to remove from the whitelist. Please try again"
"The API key for that API mode has not been added yet. Please add your key and try again","The API key for that API mode has not been added yet. Please add your key and try again"
"Orders Processed by Bayonet Anti-Fraud","Orders Processed by Bayonet Anti-Fraud"
@@ -109,3 +109,9 @@ Whitelist,Whitelist
Decision,Decision
"Triggered Rules","Triggered Rules"
Created,Created
+accept,ACCEPT
+review,REVIEW
+decline,DECLINE
+ACCEPT,ACCEPT
+REVIEW,REVIEW
+DECLINE,DECLINE
\ No newline at end of file
diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv
index ca950c3..19ed734 100644
--- a/i18n/es_ES.csv
+++ b/i18n/es_ES.csv
@@ -1,12 +1,12 @@
"Bayonet Anti-Fraud","Bayonet Anti-Fraud"
"Bayonet Anti-Fraud Blocklist/Whitelist","Lista de Bloqueo/Aprobación de Bayonet Anti-Fraud"
-"Customer added to blocklist","Cliente agregado a lista de bloqueo"
+"Email added to blocklist","Correo electrónico agregado a lista de bloqueo"
"An error ocurred while trying to add to the blocklist. Please try again","Un error ocurrió al intentar agregar el cliente a la lista de bloqueo. Por favor intenta de nuevo"
-"Customer removed from blocklist","Cliente removido de la lista de bloqueo"
+"Email removed from blocklist","Correo electrónico removido de la lista de bloqueo"
"An error ocurred while trying to remove from the blocklist. Please try again","Un error ocurrió al intentar remover el cliente de la lista de bloqueo. Por favor intenta de nuevo"
-"Customer added to whitelist","Cliente agregado a la lista de aceptación"
+"Email added to whitelist","Correo electrónico agregado a la lista de aceptación"
"An error ocurred while trying to add to the whitelist. Please try again","Un error ocurrió al intentar agregar el cliente a la lista de aceptación. Por favor intenta de nuevo"
-"Customer removed from whitelist","Customer removed from whitelist"
+"Email removed from whitelist","Correo electrónico removed from whitelist"
"An error ocurred while trying to remove from the whitelist. Please try again","Un error ocurrió al intentar remover el cliente de la lista de aceptación. Por favor intenta de nuevo"
"The API key for that API mode has not been added yet. Please add your key and try again","La llave de API para este modo de API no ha sido agregada aún. Por favor agrega tu llave e intenta de nuevo"
"Orders Processed by Bayonet Anti-Fraud","Ordenes Procesadas por Bayonet Anti-Fraud"
@@ -38,7 +38,7 @@ Added,Agregado
"Information for Bayonet Anti-Fraud","Información para Bayonet Anti-Fraud"
"ID of Order:","ID de orden:"
"Bayonet Tracking ID:","Bayonet Tracking ID:"
-"API Call Status:","Estatus de la Llama al API:"
+"API Call Status:","Estatus de la Llamada al API:"
Decision:,Decisión:
"Triggered Rules:","Reglas Disparadas:"
"Orders Processed by Bayonet","Ordenes Procesadas por Bayonet"
@@ -59,7 +59,7 @@ Blocklist/Whitelist,Lista de Bloqueo/Aceptación
In order to be able to use Bayonet in Live Mode properly, you must add both your IP address and your domain to the whitelist in Bayonet's Console.
This is located in the Setup section, the same place where you get your API keys.
- If you need any support regarding this module, you can either send a mail to soporte@bayonet.io or contact us via Intercom on our Website.
+ If you need any support regarding this module, you can either send a mail to magento@bayonet.io or contact us via Intercom on our Website.
","
IMPORTANTE - LEE EL MANUAL
@@ -107,4 +107,9 @@ Whitelist,Lista de Aceptación
Decision,Decisión
"Triggered Rules","Reglas Disparadas"
Created,Creado
-"View Order Details","Ver Detalles de Orden"
+accept,ACEPTAR
+review,REVISAR
+decline,DECLINAR
+ACCEPT,ACEPTAR
+REVIEW,REVISAR
+DECLINE,DECLINAR
diff --git a/i18n/es_MX.csv b/i18n/es_MX.csv
index ca950c3..432f28b 100644
--- a/i18n/es_MX.csv
+++ b/i18n/es_MX.csv
@@ -1,12 +1,12 @@
"Bayonet Anti-Fraud","Bayonet Anti-Fraud"
"Bayonet Anti-Fraud Blocklist/Whitelist","Lista de Bloqueo/Aprobación de Bayonet Anti-Fraud"
-"Customer added to blocklist","Cliente agregado a lista de bloqueo"
+"Email added to blocklist","Correo electrónico agregado a lista de bloqueo"
"An error ocurred while trying to add to the blocklist. Please try again","Un error ocurrió al intentar agregar el cliente a la lista de bloqueo. Por favor intenta de nuevo"
-"Customer removed from blocklist","Cliente removido de la lista de bloqueo"
+"Email removed from blocklist","Correo electrónico removido de la lista de bloqueo"
"An error ocurred while trying to remove from the blocklist. Please try again","Un error ocurrió al intentar remover el cliente de la lista de bloqueo. Por favor intenta de nuevo"
-"Customer added to whitelist","Cliente agregado a la lista de aceptación"
+"Email added to whitelist","Correo electrónico agregado a la lista de aceptación"
"An error ocurred while trying to add to the whitelist. Please try again","Un error ocurrió al intentar agregar el cliente a la lista de aceptación. Por favor intenta de nuevo"
-"Customer removed from whitelist","Customer removed from whitelist"
+"Email removed from whitelist","Correo electrónico removed from whitelist"
"An error ocurred while trying to remove from the whitelist. Please try again","Un error ocurrió al intentar remover el cliente de la lista de aceptación. Por favor intenta de nuevo"
"The API key for that API mode has not been added yet. Please add your key and try again","La llave de API para este modo de API no ha sido agregada aún. Por favor agrega tu llave e intenta de nuevo"
"Orders Processed by Bayonet Anti-Fraud","Ordenes Procesadas por Bayonet Anti-Fraud"
@@ -38,7 +38,7 @@ Added,Agregado
"Information for Bayonet Anti-Fraud","Información para Bayonet Anti-Fraud"
"ID of Order:","ID de orden:"
"Bayonet Tracking ID:","Bayonet Tracking ID:"
-"API Call Status:","Estatus de la Llama al API:"
+"API Call Status:","Estatus de la Llamada al API:"
Decision:,Decisión:
"Triggered Rules:","Reglas Disparadas:"
"Orders Processed by Bayonet","Ordenes Procesadas por Bayonet"
@@ -59,7 +59,7 @@ Blocklist/Whitelist,Lista de Bloqueo/Aceptación
In order to be able to use Bayonet in Live Mode properly, you must add both your IP address and your domain to the whitelist in Bayonet's Console.
This is located in the Setup section, the same place where you get your API keys.
- If you need any support regarding this module, you can either send a mail to soporte@bayonet.io or contact us via Intercom on our Website.
+ If you need any support regarding this module, you can either send a mail to magento@bayonet.io or contact us via Intercom on our Website.
","
IMPORTANTE - LEE EL MANUAL
@@ -107,4 +107,9 @@ Whitelist,Lista de Aceptación
Decision,Decisión
"Triggered Rules","Reglas Disparadas"
Created,Creado
-"View Order Details","Ver Detalles de Orden"
+accept,ACEPTAR
+review,REVISAR
+decline,DECLINAR
+ACCEPT,ACEPTAR
+REVIEW,REVISAR
+DECLINE,DECLINAR
\ No newline at end of file
diff --git a/view/adminhtml/templates/tab/view/my_order_info.phtml b/view/adminhtml/templates/tab/view/my_order_info.phtml
index 404c11d..679e51c 100644
--- a/view/adminhtml/templates/tab/view/my_order_info.phtml
+++ b/view/adminhtml/templates/tab/view/my_order_info.phtml
@@ -25,7 +25,7 @@