FIX: mapeo de datos al actualizar pago
This commit is contained in:
@ -161,7 +161,7 @@ class Toku extends Ideal\Service
|
||||
$customer = $this->customer->getByExternalId($request['customer']);
|
||||
$invoice = $this->invoice->getByExternalId($request['invoice']);
|
||||
|
||||
return $this->invoice->update($invoice['id'], $request);
|
||||
return $this->invoice->update($invoice['toku_id'], $request);
|
||||
}
|
||||
protected function successTransaction(array $input): bool
|
||||
{
|
||||
@ -253,6 +253,9 @@ class Toku extends Ideal\Service
|
||||
protected function mapPaymentEventData(array $input): array
|
||||
{
|
||||
$data = $input['payment'];
|
||||
if (!array_key_exists('amount', $data) and array_key_exists('payment_amount', $data)) {
|
||||
$data['amount'] = $data['payment_amount'];
|
||||
}
|
||||
$data['status'] = 'AUTHORIZED';
|
||||
$data['date'] = $data['payment_date'];
|
||||
return $data;
|
||||
|
Reference in New Issue
Block a user