From d1905194bdfa343cd3935433fa3bb066cb5bce60 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Thu, 8 May 2025 17:16:03 -0400 Subject: [PATCH] rut en Customer en formato Toku --- app/src/Model/MediosPago/Toku/Customer.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/Model/MediosPago/Toku/Customer.php b/app/src/Model/MediosPago/Toku/Customer.php index 13b710e..65e116f 100644 --- a/app/src/Model/MediosPago/Toku/Customer.php +++ b/app/src/Model/MediosPago/Toku/Customer.php @@ -9,10 +9,15 @@ class Customer extends Ideal\Model public Persona $persona; public string $toku_id; + public function rut(): string + { + return implode('', [$this->persona->rut, strtoupper($this->persona->digito)]); + } + protected function jsonComplement(): array { return [ - 'rut' => implode('', [$this->persona->rut, $this->persona->digito]), + 'rut' => $this->rut(), 'toku_id' => $this->toku_id ]; }