Versión 2.6.3 HOT FIX que arregla el bug que impedía hacer referencias de oxxo porque se duplicaba la multiplicación del factor 100 para la conversión de centavos
This commit is contained in:
parent
12d19c46de
commit
eafc867742
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 106 KiB |
3034
data/plugin.log
3034
data/plugin.log
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
||||
"displayName": "SIIP - Procesador de Pagos en línea con Stripe, Oxxo y Transferencia, Sincronizador de CallBell y Envío de Notificaciones y comprobantes vía WhatsApp",
|
||||
"description": "Este plugin sincroniza los clientes del sitema UISP CRM con los contactos de WhatsApp en CallBell, además procesa pagos de Stripe como las trasferencias bancarias y genera referencias de pago vía OXXO, además envía comprobantes de pago en formato imagen PNG o texto vía Whatsapp a los clientes",
|
||||
"url": "https://siip.mx/",
|
||||
"version": "2.6.2",
|
||||
"version": "2.6.3",
|
||||
"unmsVersionCompliancy": {
|
||||
"min": "2.1.0",
|
||||
"max": null
|
||||
|
||||
@ -108,7 +108,7 @@ abstract class AbstractOxxoOperationsFacade
|
||||
|
||||
|
||||
// Obtener el monto pendiente del cliente en centavos
|
||||
$amount = abs($arrayClientCRM['accountOutstanding']) * 100;
|
||||
$amount = abs($arrayClientCRM['accountOutstanding']);
|
||||
|
||||
$this->logger->info("Se obtuvieron los datos del cliente y Stripe Customer ID: " . $stripeCustomerId . PHP_EOL);
|
||||
} catch (RequestException $e) {
|
||||
@ -144,15 +144,29 @@ abstract class AbstractOxxoOperationsFacade
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
// Obtener los nombres del cliente
|
||||
$firstName = isset($arrayClientCRM['firstName']) ? trim($arrayClientCRM['firstName']) : '';
|
||||
$lastName = isset($arrayClientCRM['lastName']) ? trim($arrayClientCRM['lastName']) : '';
|
||||
|
||||
// Validar que los nombres no estén vacíos y tengan al menos 2 caracteres
|
||||
if (strlen($firstName) < 2 || strlen($lastName) < 2) {
|
||||
$this->logger->error('El nombre o apellido del cliente es inválido. Ambos deben tener al menos 2 caracteres.' . PHP_EOL);
|
||||
return 'errorNombreApellidoInvalido';
|
||||
}
|
||||
|
||||
$this->logger->info("El nombre del cliente es: " . $firstName . ' ' . $lastName . PHP_EOL);
|
||||
|
||||
$this->logger->info("Creando payment methods del voucher" . PHP_EOL);
|
||||
$paymentMethod = $stripe->paymentMethods->create([
|
||||
'type' => 'oxxo',
|
||||
'billing_details' => [
|
||||
'name' => $arrayClientCRM['firstName'] . ' ' . $arrayClientCRM['lastName'],
|
||||
'name' => $firstName . ' ' . $lastName,
|
||||
'email' => $clientEmail,
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
$this->logger->info("Confirmando el paymentIntent" . PHP_EOL);
|
||||
$paymentIntent = $stripe->paymentIntents->confirm(
|
||||
$paymentIntent->id,
|
||||
|
||||
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '9fc3bcb8d9ddaccbfe7d320660582f1f65c7724d',
|
||||
'reference' => '12d19c46de49ae1f0c937e9ebe2aa371b0b76379',
|
||||
'name' => 'ucrm-plugins/sms-twilio',
|
||||
'dev' => false,
|
||||
),
|
||||
@ -307,7 +307,7 @@
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '9fc3bcb8d9ddaccbfe7d320660582f1f65c7724d',
|
||||
'reference' => '12d19c46de49ae1f0c937e9ebe2aa371b0b76379',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user