TransbankDevelopers / transbank-plugin-opencart-webpay

OBSOLETO. Plugin oficial de Webpay para Opencart 3.x
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Error in Install of OnePay and WebPay in same OpenCart #10

Open blastter opened 5 years ago

blastter commented 5 years ago

Hello, I've installed the OnePay and WebPay extentions in OpenCart 3, the thing is when you install the first it works but when you install also the second the first one stops working, because the second one replaces the content of the "transbank-sdk-php" in "./system/library/" leaving support for the last payment method installed. My temporary solution was to install the first and move the directory "transbank-sdk-php" to "transbank-sdk-php-{method of payment}" and edited the "require_once" in the "TransbankSdk{method of payment}.php" to insert the extra part of the folder name, and installed the second payment method as default and both payment methods worked just fine. I'll be waiting for your comments.

a1b4 commented 5 years ago

@blastter Hello, Did you fix this problem?

Best,

blastter commented 5 years ago

El problema es que para OnePay y para WebPay, a pesar de ser formas de pago distintas, Tansbank dentro de su basta experiencia decide ponerle el mismo nombre a dos librerías distintas, lo cual al instalar la primera se carga la librería que corresponde, para esa forma de pago y si pruebas instalando solo una forma de pago, funciona perfectamente. Pero cuando instalas la segunda, la librería de la segunda reemplaza a la primera, la cual es distinta y esto genera que la primera forma de pago instalada deje de funcionar. Para arreglarlo se instala la primera forma de pago, luego vas a la librería, le cambias el nombre y editas el "include" en el archivo de la forma de pago, para cambiar el nombre de la librería importada al nuevo nombre de la librería. Por último instalas la segunda forma de pago y quedan las dos operativas. Quedo atento a tus comentarios.