{"id":841314,"date":"2026-09-10T12:18:52","date_gmt":"2026-09-10T12:18:52","guid":{"rendered":"https:\/\/www.knowband.com\/blog\/?p=841317\/"},"modified":"2026-09-30T08:35:29","modified_gmt":"2026-09-30T08:35:29","slug":"prestashop-payment-gateway-integration","status":"publish","type":"post","link":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/","title":{"rendered":"Integraci\u00f3n de una pasarela de pago personalizada en PrestaShop: requisitos t\u00e9cnicos, flujo de la API y desaf\u00edos reales de OPC"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Integrar una pasarela de pago en PrestaShop puede parecer sencillo sobre el papel.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La pasarela de pago proporciona documentaci\u00f3n de la API, credenciales de entorno de pruebas, claves de autenticaci\u00f3n, URL de devoluci\u00f3n de llamada y algunos puntos finales. El m\u00f3dulo de PrestaShop env\u00eda la solicitud de pago, recibe la respuesta, crea el pedido y redirige al cliente a la p\u00e1gina de confirmaci\u00f3n.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sin embargo, en una tienda PrestaShop real, la pasarela de pago rara vez funciona de forma aislada.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">En el momento en que una tienda utiliza un m\u00f3dulo de pago en una sola p\u00e1gina (OPC, por sus siglas en ingl\u00e9s), como SuperCheckout, m\u00faltiples m\u00f3dulos de pago, flujos de pago personalizados, iframes, m\u00e9todos de pago basados \u200b\u200ben JavaScript y personalizaciones adicionales del proceso de pago pueden interactuar entre s\u00ed.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Aqu\u00ed es donde muchas integraciones de pago se complican.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Durante el proceso de compatibilidad de la pasarela de pago, nos hemos encontrado con casos en los que un m\u00e9todo de pago funcionaba perfectamente con el proceso de pago predeterminado de PrestaShop, pero se comportaba de forma diferente dentro de OPC. Por ejemplo, un proveedor de pago pod\u00eda mostrarse correctamente en el proceso de pago est\u00e1ndar, mientras que opciones como BLIK, selecci\u00f3n bancaria o BNPL desaparec\u00edan en SuperCheckout.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La lecci\u00f3n importante fue que integrar una pasarela de pago no se trata solo de hacer que la llamada a la API funcione, sino de lograr que todo el ciclo de pago funcione correctamente dentro del proceso de pago de PrestaShop.<\/span><\/p>\n<h2><strong>1.0 \u00bfQu\u00e9 necesita realmente una pasarela de pago personalizada?<\/strong><\/h2>\n<p><a href=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-841347 size-full\" src=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1.jpg\" alt=\"\u00bfQu\u00e9 necesita realmente una pasarela de pago personalizada?\" width=\"700\" height=\"700\" srcset=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1.jpg 700w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1-300x300.jpg 300w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1-150x150.jpg 150w, https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-2-1-60x60.jpg 60w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">A grandes rasgos, una integraci\u00f3n de pago para PrestaShop debe gestionar cinco aspectos:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Mostrar el m\u00e9todo de pago al finalizar la compra.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Env\u00ede los datos del cliente o del pago a la pasarela de pago.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Recibir y validar la respuesta de la puerta de enlace.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Crea o actualiza correctamente el pedido de PrestaShop.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Redirija al cliente a la p\u00e1gina de confirmaci\u00f3n o de error correspondiente.<\/span><\/li>\n<\/ol>\n<p dir=\"ltr\">Un m\u00f3dulo de pago t\u00edpico extiende la clase base en lugar de hacerlo.<\/p>\n<p dir=\"ltr\">El m\u00f3dulo de pago normalmente funciona con ganchos como:<\/p>\n<p dir=\"ltr\">El hook es responsable de que el m\u00e9todo de pago est\u00e9 disponible en la p\u00e1gina de pago.<\/p>\n<p dir=\"ltr\">El gancho gestiona lo que el cliente ve despu\u00e9s de regresar del proceso de pago.<\/p>\n<p><span style=\"font-weight: 400;\">Por ejemplo: <\/span><\/p>\n<pre>public function hookPaymentOptions($params) { if (!$this-&gt;active || !$this-&gt;checkCurrency($params['cart'])) { return []; } $paymentOption = new PaymentOption(); $paymentOption -&gt;setCallToActionText($this-&gt;l('Pagar con tarjeta')) -&gt;setAction( $this-&gt;context-&gt;link-&gt;getModuleLink( $this-&gt;name, 'redirect', [], true ) ); return [$paymentOption]; }<\/pre>\n<p><span style=\"font-weight: 400;\">Lo importante es que este gancho no debe simplemente asumir que el m\u00e9todo de pago siempre se puede mostrar.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La moneda, el pa\u00eds, el operador, el estado del cliente, el importe del carrito, la configuraci\u00f3n del m\u00f3dulo y la disponibilidad de la pasarela de pago pueden influir en si se debe mostrar o no el m\u00e9todo de pago.<\/span><\/p>\n<h2><strong>2.0 La pieza que lo cambia todo: OPC<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">El proceso de pago predeterminado de PrestaShop y un m\u00f3dulo OPC no necesariamente procesan los m\u00e9todos de pago exactamente de la misma manera.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Esta fue una de las lecciones m\u00e1s importantes que aprend\u00ed al trabajar con m\u00faltiples m\u00f3dulos de pago.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Con el proceso de pago predeterminado, un m\u00f3dulo de pago generalmente controla la representaci\u00f3n de sus opciones de pago y el flujo de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Con un OPC, el m\u00f3dulo de pago se convierte en otra capa entre el m\u00f3dulo de pago y el cliente. Esto significa que pueden interactuar los siguientes elementos:<\/span><\/p>\n<pre><b>El cliente<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>OPC \/ SuperCheckout<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Opciones de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>M\u00f3dulo de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>API de puerta de enlace<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Respuesta de puerta de enlace<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>M\u00f3dulo de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>OPC \/ PrestaShop<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Confirmaci\u00f3n del pedido<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Por lo tanto, un m\u00f3dulo de pago puede ser completamente correcto desde la perspectiva de la API y aun as\u00ed no comportarse correctamente dentro de un OPC.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por eso, las pruebas de compatibilidad de pagos siempre deben incluir ambos:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Pago predeterminado de PrestaShop<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">El OPC real utilizado por la tienda<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Probar \u00fanicamente el proceso de pago predeterminado puede dar la falsa impresi\u00f3n de que la integraci\u00f3n est\u00e1 completa.<\/span><\/p>\n<h2><strong>3.0 Un ejemplo real: Faltan opciones de PayU en OPC<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Uno de los problemas pr\u00e1cticos con los que nos encontramos estaba relacionado con las opciones de pago de PayU.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">En el proceso de pago est\u00e1ndar de PrestaShop, PayU mostraba correctamente los m\u00e9todos de pago disponibles. Sin embargo, en SuperCheckout faltaban algunas opciones de pago.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por ejemplo, dependiendo de la configuraci\u00f3n y del carrito:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">BLIK no era visible de forma constante.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">La lista de selecci\u00f3n de bancos no se expandi\u00f3 correctamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Faltaban algunas filas de pago\/BNPL.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">En algunos casos, BLIK aparec\u00eda y luego desaparec\u00eda.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">A primera vista, parec\u00eda un problema de la API de PayU. Pero no lo era.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">El paso diagn\u00f3stico clave consisti\u00f3 en comparar el flujo de pago entre el proceso de pago predeterminado y SuperCheckout.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Cuando el mismo m\u00f3dulo de pago funciona en el proceso de pago predeterminado pero falla dentro de OPC, la investigaci\u00f3n debe ir m\u00e1s all\u00e1 de la API de la pasarela de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Necesitamos comprobar c\u00f3mo la OPC construye los m\u00e9todos de pago y qu\u00e9 informaci\u00f3n transmite a los m\u00f3dulos de pago.<\/span><\/p>\n<h2><strong>4.0 El importe del pago puede afectar a la visibilidad del m\u00e9todo de pago.<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una parte particularmente importante de esta investigaci\u00f3n fue el monto del carrito. Las pasarelas de pago suelen tener l\u00edmites m\u00ednimos y m\u00e1ximos de transacci\u00f3n. Por ejemplo:<\/span><\/p>\n<pre><b>M\u00e9todo de Pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Comprobar el importe del carrito<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>\u00bfCantidad m\u00ednima? \u00bfCantidad m\u00e1xima?<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Elegible \/ No elegible<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Durante la investigaci\u00f3n de compatibilidad de PayU, rastreamos la l\u00f3gica de filtrado del m\u00e9todo de pago hasta el importe del carrito que se procesaba mediante las comprobaciones del m\u00e9todo de pago.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">El flujo relevante implicaba el c\u00e1lculo del carrito de PrestaShop y el filtrado de m\u00e9todos de pago, incluyendo la l\u00f3gica relacionada con:<\/span><\/p>\n<pre>Carrito::AMBOS<\/pre>\n<p><span style=\"font-weight: 400;\">y:<\/span><\/p>\n<pre><b>PayMethodsCache::checkMinMax<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Esto es importante porque una opci\u00f3n de pago puede desaparecer del proceso de compra sin que la propia API devuelva un error.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Es posible que la pasarela simplemente se considere no apta para el importe recibido por el m\u00f3dulo de pago. Esto nos proporciona una regla de depuraci\u00f3n importante:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Si una opci\u00f3n de pago desaparece de un OPC, no asuma de inmediato que la API de pago est\u00e1 fallando. Primero verifique el monto del carrito, la moneda, los l\u00edmites m\u00ednimo y m\u00e1ximo, y los valores que cumplen con los requisitos de elegibilidad del m\u00e9todo de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Esto cobra a\u00fan m\u00e1s importancia cuando intervienen descuentos, gastos de env\u00edo, impuestos, cupones o c\u00e1lculos de pago personalizados.<\/span><\/p>\n<h2><strong>5.0 Por qu\u00e9 los m\u00e9todos de pago pueden funcionar en el proceso de pago predeterminado pero fallar en SuperCheckout<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una forma \u00fatil de investigar estos problemas es comparar los dos entornos de pago.<\/span><\/p>\n<h3><strong>5.1 Proceso de pago predeterminado de PrestaShop<\/strong><\/h3>\n<pre><b>Carrito<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Buscador de opciones de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Ganchos de opciones de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>M\u00f3dulos de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Opciones de pago<\/b><\/pre>\n<h3><strong>5.2 Pago OPC<\/strong><\/h3>\n<pre><b>Carrito<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>SuperCheckout<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>M\u00e9todos de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>M\u00f3dulos de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Procesamiento OPC adicional<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Interfaz de usuario de pago renderizada<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">El segundo flujo tiene partes m\u00f3viles adicionales.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por lo tanto, al depurar un problema de pago, no solo comprobamos: &#8220;\u00bfFunciona el m\u00f3dulo de pago?&#8221;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Verificamos: <\/span><span style=\"font-weight: 400;\">&#8220;\u00bfFunciona el m\u00f3dulo de pago cuando su salida es consumida y renderizada por esta implementaci\u00f3n de pago en particular?&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Esa distinci\u00f3n ahorr\u00f3 una cantidad considerable de tiempo de depuraci\u00f3n.<\/span><\/p>\n<h2><strong>6.0 PaymentOption es solo una parte de la integraci\u00f3n.<\/strong><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">A partir de PrestaShop 1.7, los m\u00f3dulos de pago generalmente utilizan la generaci\u00f3n de HTML de pago a trav\u00e9s del m\u00e9todo de gancho de pago anterior.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Una opci\u00f3n de pago puede contener informaci\u00f3n como:<\/span><\/p>\n<pre><b>$opci\u00f3n de pago<\/b>\r\n<b>-&gt;establecerCallToActionText(...)<\/b>\r\n<b>-&gt;establecerAcci\u00f3n(...)<\/b>\r\n<b>-&gt;establecerEntradas(...)<\/b>\r\n<b>-&gt;establecerInformaci\u00f3nAdicional(...)<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">objetos en lugar de directamente<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Las distintas pasarelas requieren diferentes combinaciones.<\/span><\/p>\n<h3><strong>6.1 Puerta de enlace basada en redireccionamiento<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">El cliente hace clic en el m\u00e9todo de pago y es redirigido a la pasarela de pago.<\/span><\/p>\n<pre><b>Finalizar Compra<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Opci\u00f3n de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Controlador de m\u00f3dulo<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Gateway<\/b><\/pre>\n<h3><strong>6.2 Formulario de pago integrado<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Los campos de pago se muestran directamente en la p\u00e1gina de pago.<\/span><\/p>\n<pre><b>Finalizar Compra<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Opci\u00f3n de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Tarjeta\/formulario de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>API de puerta de enlace<\/b><\/pre>\n<h3><strong>6.3 Pago basado en iframe<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">La interfaz de la pasarela de pago est\u00e1 integrada en el proceso de compra.<\/span><\/p>\n<pre><b>Finalizar Compra<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Opci\u00f3n de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Iframe<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Gateway<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Los dos \u00faltimos enfoques requieren atenci\u00f3n adicional porque JavaScript, la manipulaci\u00f3n del DOM, la carga de iframes y las actualizaciones de OPC pueden afectar la interfaz de pago.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<h2><strong>7.0 JavaScript se vuelve fundamental con OPC<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Esta es un \u00e1rea que las gu\u00edas gen\u00e9ricas de integraci\u00f3n de pagos suelen pasar por alto.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Un OPC puede actualizar din\u00e1micamente partes del proceso de pago cuando el cliente cambia:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">direcci\u00f3n de entrega<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">pa\u00eds<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">portador<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">m\u00e9todo de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Datos de facturaci\u00f3n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u00e9todo de env\u00edo<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Cuando eso sucede, se puede reemplazar el c\u00f3digo HTML relacionado con el pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por lo tanto, un evento de JavaScript que funcionaba durante la carga inicial de la p\u00e1gina puede dejar de funcionar despu\u00e9s de una actualizaci\u00f3n mediante AJAX.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por ejemplo: <\/span><\/p>\n<pre><b>Carga inicial del proceso de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Pago JS inicializado<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>El cliente modifica la informaci\u00f3n de pago\/env\u00edo.<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>OPC actualiza la secci\u00f3n de pagos<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>DOM original reemplazado<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>El pago JS ya no est\u00e1 adjunto<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Esto puede producir s\u00edntomas confusos.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">El m\u00e9todo de pago puede aparecer inicialmente, pero al hacer clic en \u00e9l no sucede nada. El iframe puede desaparecer.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Es posible que la lista de bancos deje de ampliarse.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Una opci\u00f3n de pago puede aparecer y desaparecer despu\u00e9s de que cambie otro campo del proceso de compra.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por lo tanto, el trabajo de compatibilidad a menudo requiere cambios no solo en PHP, sino tambi\u00e9n en el JavaScript del m\u00f3dulo de pago.<\/span><\/p>\n<h2><strong>8.0 Un ejemplo real: SimplyLease + SuperCheckout<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Otro ejemplo involucr\u00f3 la integraci\u00f3n de SimplyLease con SuperCheckout. El problema no se limitaba a la API de la pasarela de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Algunos elementos de la informaci\u00f3n y la calculadora de SimplyLease formaban parte de la presentaci\u00f3n de pago y deb\u00edan funcionar correctamente dentro del flujo de SuperCheckout.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Los cambios de compatibilidad afectaron tanto a las plantillas de m\u00f3dulos como a la integraci\u00f3n de JavaScript del lado de SuperCheckout. Los archivos afectados incluyeron:<\/span><\/p>\n<pre><b>m\u00f3dulos\/simplylease\/views\/templates\/hook\/payment_info.tpl m\u00f3dulos\/simplylease\/views\/templates\/hook\/product_calculator.tpl<\/b>\r\n\r\n<b>m\u00f3dulos\/supercheckout\/controladores\/front\/SupercheckoutCore.php m\u00f3dulos\/supercheckout\/vistas\/js\/front\/supercheckout.js\r\n<\/b><b>m\u00f3dulos\/supercheckout\/views\/js\/front\/simplylease_supercheckout.js<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Este es un buen ejemplo de por qu\u00e9 la compatibilidad de pagos a veces requiere cambios fuera del propio m\u00f3dulo de la pasarela de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">El proveedor de pagos puede exponer los datos correctos, pero el proceso de pago a\u00fan debe:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Render\u00edzalo.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Cons\u00e9rvelo durante las actualizaciones del proceso de pago.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Inicialice el JavaScript necesario.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Mant\u00e9n la informaci\u00f3n de pago sincronizada con el carrito actual.<\/span><\/li>\n<\/ol>\n<h2><strong>9.0 Otro problema com\u00fan: El m\u00e9todo de pago no aparece.<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Tambi\u00e9n nos encontramos con casos en los que un m\u00e9todo de pago como Comfino no aparec\u00eda en SuperCheckout a pesar de que el m\u00f3dulo de pago estaba instalado y configurado.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Este tipo de problema debe investigarse sistem\u00e1ticamente.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Comprobar:<\/span><\/p>\n<h3><strong>9.1 \u00bfEst\u00e1 activo el m\u00f3dulo?<\/strong><\/h3>\n<pre><b>$this-&gt;activo<\/b><\/pre>\n<h3><strong>9.2 \u00bfSe admite la moneda?<\/strong><\/h3>\n<pre><b>$this-&gt;checkCurrency($params['cart'])<\/b><\/pre>\n<h3><strong>9.3 \u00bfEl pa\u00eds cuenta con apoyo?<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Algunas pasarelas de pago restringen los m\u00e9todos de pago en funci\u00f3n del pa\u00eds del cliente.<\/span><\/p>\n<h3><strong>9.4 \u00bfEl total del carrito est\u00e1 dentro de los l\u00edmites de la pasarela de pago?<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Los valores m\u00ednimos y m\u00e1ximos de transacci\u00f3n pueden impedir que se muestre un m\u00e9todo.<\/span><\/p>\n<h3><strong>9.5 \u00bfEs compatible el operador?<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Algunos m\u00f3dulos de pago restringen los m\u00e9todos de pago seg\u00fan el operador.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<h3><strong>9.6 \u00bfEl filtrado OPC es el m\u00e9todo?<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">El m\u00f3dulo de pago puede devolver m\u00e9todos v\u00e1lidos que se recopilan, filtran o muestran.<\/span><span style=\"font-weight: 400;\"> Pero la OPC a\u00fan puede modificar la forma de pago<\/span><\/p>\n<h3><strong>9.7 \u00bfJavaScript est\u00e1 ocultando o reemplazando el elemento?<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Un m\u00e9todo de pago puede ser devuelto t\u00e9cnicamente por PHP, pero aun as\u00ed no ser visible en el proceso de pago final.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por eso, las herramientas para desarrolladores del navegador son tan importantes como los registros de PHP a la hora de depurar las integraciones de pago.<\/span><\/p>\n<h2><strong>10.0 Ganchos a los que realmente debemos prestar atenci\u00f3n<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una integraci\u00f3n de pago personalizada no debe tratarse como una implementaci\u00f3n de un solo punto de acceso.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Los puntos de activaci\u00f3n exactos dependen de la arquitectura de la pasarela de pago y del proceso de compra, pero algunos son especialmente importantes.<\/span><\/p>\n<h3>10.1 Opciones de pago<\/h3>\n<p><span style=\"font-weight: 400;\">Este es el gancho principal para mostrar el m\u00e9todo de pago al proceso de compra.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Es responsable de devolver<\/span> Opciones de pago <span style=\"font-weight: 400;\">objetos.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Las comprobaciones t\u00edpicas incluyen:<\/span><\/p>\n<pre><b>si (!$this-&gt;active) { return [];<\/b>\r\n<b>}<\/b>\r\n<b>if (!$this-&gt;checkCurrency($params['cart'])) { return [];<\/b>\r\n<b>}<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Posteriormente, se pueden aplicar restricciones adicionales espec\u00edficas para cada puerta de enlace.<\/span><\/p>\n<h3>10.2 Devoluciones de pago<\/h3>\n<p><span style=\"font-weight: 400;\">Esto se utiliza despu\u00e9s de que el cliente haya completado o regresado del proceso de pago. Puede mostrar:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">referencia de pedido<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">estado de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Instrucciones de pago adicionales<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Informaci\u00f3n espec\u00edfica de la puerta de enlace<\/span><\/li>\n<\/ul>\n<h3>10.3 acci\u00f3nPresentarOpcionesDePago<\/h3>\n<p><span style=\"font-weight: 400;\">Este gancho resulta particularmente interesante cuando intervienen varios m\u00f3dulos de pago y un OPC.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Funciona sobre las opciones de pago recopiladas y puede resultar \u00fatil cuando el proceso de pago necesita inspeccionar o modificar la colecci\u00f3n completa de opciones de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Esto es diferente a implementar las opciones de pago de una sola pasarela.<\/span> <span style=\"font-weight: 400;\">gancho.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La distinci\u00f3n es importante:<\/span><\/p>\n<pre><b>Opciones de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Cada m\u00f3dulo de pago aporta su opci\u00f3n<\/b>\r\n<b>acci\u00f3nPresentarOpcionesDePago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Las opciones de pago ensambladas se pueden procesar<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Al depurar la compatibilidad con OPC, comprender d\u00f3nde se recopilan las opciones de pago y d\u00f3nde se presentan finalmente puede marcar la diferencia entre encontrar el problema r\u00e1pidamente y pasar horas dentro del m\u00f3dulo de la pasarela de pago.<\/span><\/p>\n<h2><strong>11.0 Creaci\u00f3n de pedidos: Nunca conf\u00edes en el navegador.<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una vez que el pago llega a la pasarela de pago, el siguiente paso cr\u00edtico es la creaci\u00f3n del pedido. El m\u00e9todo m\u00e1s importante de PrestaShop en este caso es:<\/span><\/p>\n<pre>validarOrden()<\/pre>\n<p><span style=\"font-weight: 400;\">Un ejemplo simplificado es:<\/span><\/p>\n<pre><b>$this-&gt;module-&gt;validateOrder(<\/b>\r\n<b>$cart-&gt;id, Configuration::get('PS_OS_PAYMENT'),<\/b>\r\n<b>$cantidadPagada,<\/b>\r\n<b>$m\u00e9todo de pago,<\/b>\r\n<b>$mensaje, [],<\/b>\r\n<b>nulo, falso,<\/b>\r\n<b>$cliente-&gt;clave_segura<\/b>\r\n<b>);<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Hay tres valores que merecen especial atenci\u00f3n:<\/span><\/p>\n<h3><strong>11.1 ID del carrito<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">El carrito debe pertenecer al cliente\/sesi\u00f3n previsto y debe ser v\u00e1lido.<\/span><\/p>\n<h3><strong>11.2 Importe del pago<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">No utilice a ciegas:<\/span><\/p>\n<pre><b>$cart-&gt;getOrderTotal()<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">como prueba de que la pasarela recibi\u00f3 esa cantidad.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">El importe debe validarse con la respuesta de la pasarela de pago.<\/span><\/p>\n<h3><strong>11.3 Clave segura<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">El cliente <\/span><span style=\"font-weight: 400;\">debe estar correctamente asociado con el flujo del carrito\/pedido.<\/span><\/p>\n<h2><strong>12.0 Los webhooks deben ser idempotentes.<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una pasarela de pago puede enviar el mismo webhook m\u00e1s de una vez. Por ejemplo:<\/span><\/p>\n<pre><b>Gateway<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>web hook<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Su servidor<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>200 respuesta<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Si se pierde la respuesta:<\/span><\/p>\n<pre><b>Gateway<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>web hook<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Su servidor<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Respuesta perdida<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Reintentos de puerta de enlace<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Si la integraci\u00f3n crea un pedido cada vez que recibe un webhook, es posible que se produzcan pedidos duplicados. Por lo tanto, la funci\u00f3n de devoluci\u00f3n de llamada debe verificar si el carrito ya tiene un pedido antes de crear otro. Conceptualmente:<\/span><\/p>\n<pre><b>Si ($cart-&gt;OrderExists()) {<\/b>\r\n<b>\/\/ Ya procesado<\/b>\r\n<b>\/\/ Devuelve una respuesta exitosa<\/b>\r\n<b>}<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">El gestor de webhooks debe dise\u00f1arse para procesar de forma segura las notificaciones repetidas.<\/span><\/p>\n<h2><strong>13.0 Pago s\u00edncrono frente a pago as\u00edncrono<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">No todas las pasarelas de pago confirman el pago de inmediato.<\/span><\/p>\n<h3><strong>13.1 Sincr\u00f3nico<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">La pasarela de pago confirma la transacci\u00f3n de inmediato.<\/span><\/p>\n<pre><b>El cliente<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Gateway<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Pago aprobado<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>validarOrden()<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>PAGO DE PS_OS<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Confirmaci\u00f3n<\/b><\/pre>\n<h3><strong>13.2 Asincr\u00f3nico<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">El cliente puede devolver el producto antes de que llegue la confirmaci\u00f3n del pago final.<\/span><\/p>\n<pre><b>El cliente<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Gateway<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Volver a la tienda<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Orden pendiente<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>web hook<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Verificar pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Cambiar el estado de la orden<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Pago aceptado<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Para las pasarelas as\u00edncronas, utilizar un estado de orden pendiente dedicado suele ser m\u00e1s seguro que marcar la orden como pagada inmediatamente.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Una vez que el webhook confirma el pago:<\/span><\/p>\n<pre><b>$historial = nuevo historial de pedidos();<\/b>\r\n<b>$history-&gt;id_order = (int) $order-&gt;id;<\/b>\r\n<b>$history-&gt;changeIdOrderState( Configuration::get('PS_OS_PAYMENT'),<\/b>\r\n<b>$orden<\/b>\r\n<b>);<\/b>\r\n<b>$history-&gt;addWithemail(true);<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Esto garantiza que la transici\u00f3n del estado del pedido se realice a trav\u00e9s del mecanismo de historial de pedidos de PrestaShop en lugar de simplemente cambiar el valor de la base de datos.<\/span><\/p>\n<h2><strong>14.0 Una de las t\u00e9cnicas de depuraci\u00f3n m\u00e1s \u00fatiles: Comparar los flujos de pago<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Cuando un m\u00e9todo de pago funciona en el proceso de pago predeterminado pero no en OPC, recomendamos comparar el flujo completo.<\/span><\/p>\n<h3><strong>Paso 1: Comprobar PHP<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">\u00bfEs hookPaymentOptions()? <\/span><span style=\"font-weight: 400;\">\u00bfejecutado?<\/span><\/p>\n<h3><strong>Paso 2: Inspeccione las opciones devueltas.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">\u00bfEl m\u00f3dulo de pago realmente devuelve un<\/span> opci\u00f3n de pago<span style=\"font-weight: 400;\">?<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<h3><strong>Paso 3: Revisa el carrito<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Comparar:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">total<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">moneda<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">cliente<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">pa\u00eds<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">portador<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">descuentos<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">impuestos<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">env\u00edo<\/span><\/li>\n<\/ul>\n<h3><strong>Paso 4: Compruebe el navegador.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Buscar:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Errores de JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Elementos DOM faltantes<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">solicitudes AJAX<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">solicitudes fallidas<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">errores de iframe<\/span><\/li>\n<\/ul>\n<h3><strong>Paso 5: Compruebe el OPC<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Determina si SuperCheckout es:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">filtrar la opci\u00f3n de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">reemplazando su HTML<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Actualizando la secci\u00f3n de pagos<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Modificar el carrito antes de que se ejecute el m\u00f3dulo de pago<\/span><\/li>\n<\/ul>\n<h3><strong>Paso 6: Compruebe la puerta de enlace<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Solo despu\u00e9s de confirmar el flujo de pago local se debe profundizar en la investigaci\u00f3n:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Autenticaci\u00f3n API<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">carga \u00fatil de la solicitud<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">firma<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">respuesta<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">webhook<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">registros de la puerta de enlace<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Este enfoque por capas es mucho m\u00e1s r\u00e1pido que comenzar con la API de la puerta de enlace cada vez.<\/span><\/p>\n<h2><strong>15.0 Problemas comunes de integraci\u00f3n de pagos que hemos observado<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Las pruebas de compatibilidad en entornos reales suelen revelar problemas que no resultan obvios a partir de la documentaci\u00f3n del gateway.<\/span><\/p>\n<h3><strong>15.1 La opci\u00f3n de pago desaparece<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Posibles causas:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">moneda no admitida<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">restricci\u00f3n por pa\u00eds<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">El importe del carrito supera los l\u00edmites de la pasarela de pago.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">restricci\u00f3n del transportista<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Filtrado OPC<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Configuraci\u00f3n del m\u00f3dulo de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">JavaScript ocultando el m\u00e9todo<\/span><\/li>\n<\/ul>\n<h3><strong>15.2 BLIK u otra opci\u00f3n de pago aparece y desaparece<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Posibles causas:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Actualizaci\u00f3n AJAX del proceso de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">renderizado de la opci\u00f3n de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Inicializaci\u00f3n de JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Cambio en el total del carrito<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Se est\u00e1 recalculando la elegibilidad para el acceso.<\/span><\/li>\n<\/ul>\n<h3><strong>15.3 La lista de bancos no se ampl\u00eda.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">A menudo investigan:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Errores de JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">elementos DOM reemplazados din\u00e1micamente<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">controladores de eventos adjuntos antes de la actualizaci\u00f3n de OPC<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Inicializaci\u00f3n de JavaScript del proveedor de pagos<\/span><\/li>\n<\/ul>\n<h3><strong>15.4 El iframe desaparece<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Investigar:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">actualizar el pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">inicializaci\u00f3n de iframe<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">reemplazo del DOM<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ejecuci\u00f3n de JavaScript despu\u00e9s de las actualizaciones AJAX<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<h3><strong>15.5 El pago se realiza correctamente, pero el pedido sigue pendiente.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Comprobar:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">URL del webhook<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Entrega de webhook<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">verificaci\u00f3n de firma<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">carrito\/b\u00fasqueda de pedidos<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">transici\u00f3n de estado de orden<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">autenticaci\u00f3n de devoluci\u00f3n de llamada<\/span><\/li>\n<\/ul>\n<h3><strong>15.6 El m\u00e9todo de pago funciona en el proceso de pago predeterminado, pero no en OPC.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Esto indica claramente que el problema podr\u00eda estar en la interacci\u00f3n entre el m\u00f3dulo de pago y el OPC, en lugar de en la propia API de la pasarela de pago.<\/span><\/p>\n<h2><strong>16.0 Requisitos de seguridad para un m\u00f3dulo de pago<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Los m\u00f3dulos de pago manejan operaciones sensibles, por lo que la seguridad no puede considerarse una mejora opcional. Como m\u00ednimo:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Validar las firmas de las funciones de devoluci\u00f3n de llamada.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Validar la relaci\u00f3n entre el carrito y el cliente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Utilice HTTPS.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Validar certificados TLS.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nunca conf\u00ede en el estado de pago que proporciona \u00fanicamente el navegador.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nunca almacene informaci\u00f3n de tarjetas sin procesar a menos que la arquitectura y los requisitos de cumplimiento lo permitan expl\u00edcitamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No registre informaci\u00f3n de pago confidencial.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">\n<pre><span style=\"font-weight: 400;\">Evite serializar() y unserializar(). <\/span>\/ para datos externos no confiables.<\/pre>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Validar y convertir los valores entrantes.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Proteja los puntos finales AJAX y de devoluci\u00f3n de llamada personalizados.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Utilice tokens seguros cuando sea apropiado.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hacer que el procesamiento de webhooks sea idempotente.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Una p\u00e1gina de confirmaci\u00f3n de pago no constituye una prueba de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La respuesta verificada del servidor de la pasarela de pago es lo que deber\u00eda determinar si el pedido se considera pagado.<\/span><\/p>\n<h2><strong>17.0 \u00bfQu\u00e9 cambia al admitir m\u00faltiples m\u00f3dulos de pago?<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Otra lecci\u00f3n aprendida del trabajo de compatibilidad con OPC es que agregar un segundo o tercer m\u00f3dulo de pago puede revelar problemas que no eran visibles cuando solo exist\u00eda un m\u00e9todo de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por ejemplo: <\/span><\/p>\n<pre><b>PayPal <\/b><b>PayU<\/b>\r\n<b>Comfino<\/b>\r\n<b>SimplyLease<\/b>\r\n<b>transferencia bancaria<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">todas pueden aportar opciones de pago al mismo proceso de pago. Por lo tanto, el proceso de pago tiene que lidiar con diferentes:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Estructuras HTML<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Requisitos del iframe<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">redirecciones<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">flujos de API<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">reglas de elegibilidad<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">cantidades m\u00ednimas\/m\u00e1ximas<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">devoluciones de llamada as\u00edncronas<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Un cambio realizado en un m\u00e9todo de pago puede afectar accidentalmente a otro. Por eso, las correcciones de compatibilidad de pagos deben tener un alcance limitado.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por ejemplo, en lugar de cambiar globalmente toda la l\u00f3gica de procesamiento de opciones de pago, identifique el m\u00e9todo de pago espec\u00edfico y aplique el manejo de compatibilidad solo donde sea necesario.<\/span><\/p>\n<h2><strong>18.0 Las pruebas deben incluir escenarios de carrito de compra reales.<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Probar una pasarela de pago con un producto sencillo de 10 \u20ac no es suficiente. Una matriz de pruebas adecuada deber\u00eda incluir:<\/span><\/p>\n<table class=\"table table-hover\">\n<tbody>\n<tr>\n<td><strong>Escenario<\/strong><\/td>\n<td><strong>Qu\u00e9 verificar<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">solo producto<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Aparece la opci\u00f3n de pago<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">M\u00faltiples productos<\/span><\/td>\n<td><span style=\"font-weight: 400;\">La cantidad correcta llega a la puerta de enlace<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Descuento<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El importe final a pagar es correcto.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Costo de env\u00edo<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Gateway recibe el total correcto<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">IVA<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El importe de la pasarela coincide con el pedido.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Cantidad m\u00ednima de la pasarela<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El m\u00e9todo aparece\/desaparece correctamente<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Cantidad m\u00e1xima de puerta de enlace<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El m\u00e9todo aparece\/desaparece correctamente<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Moneda no admitida<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El m\u00e9todo est\u00e1 oculto<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Pa\u00eds no respaldado<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El m\u00e9todo est\u00e1 oculto<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Pago predeterminado<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Trabajos de pago<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">OPC<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Trabajos de pago<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Pago m\u00f3vil<\/span><\/td>\n<td><span style=\"font-weight: 400;\">La interfaz de usuario funciona<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">pago fallido<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Estado correcto del pedido\/pago<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Pago exitoso<\/span><\/td>\n<td><span style=\"font-weight: 400;\">El pedido se ha creado correctamente.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Reintento de webhook<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No se permite pedido duplicado<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Abandono del cliente<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No hay ning\u00fan pedido pagado incorrectamente.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Tiempo de espera de la puerta de enlace<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Gesti\u00f3n correcta de errores\/pendientes<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Para las integraciones de OPC, pruebe tambi\u00e9n las actualizaciones del proceso de pago. Cambie lo siguiente:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">de facturaci\u00f3n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">portador<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">pa\u00eds<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">m\u00e9todo de pago<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">la cantidad<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">descuento<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">y verifique que las opciones de pago sigan siendo correctas despu\u00e9s de cada actualizaci\u00f3n.<\/span><\/p>\n<h2><strong>19.0 Un enfoque pr\u00e1ctico para el desarrollo<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">En funci\u00f3n de los problemas que suelen aparecer en las integraciones reales, un orden de desarrollo m\u00e1s seguro es el siguiente:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<h3><strong>19.1 Hacer que la pasarela funcione con el proceso de pago predeterminado de PrestaShop.<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Primero, establezca que:<\/span><\/p>\n<pre><b>Opci\u00f3n de pago<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Solicitud de puerta de enlace<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Respuesta de puerta de enlace<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>validarOrden()<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Confirmaci\u00f3n<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">funciona correctamente.<\/span><\/p>\n<h3><strong>19.2 Agregar procesamiento de devoluci\u00f3n de llamada\/webhook<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">No deje la confirmaci\u00f3n as\u00edncrona para el final.<\/span><\/p>\n<h3><strong>19.3 Agregar manejo adecuado del estado del pedido<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Prueba:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">comercial<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">el fracaso<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">pendiente<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">tiempo de espera<\/span><\/li>\n<\/ul>\n<h3><strong>19.4 Prueba con carros realistas<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Utilice descuentos, gastos de env\u00edo, impuestos, diferentes monedas y diferentes totales.<\/span><\/p>\n<h3><strong>19.5 Integraci\u00f3n con OPC<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Solo despu\u00e9s de que el flujo b\u00e1sico de la puerta de enlace sea estable, deber\u00eda investigar la compatibilidad con SuperCheckout.<\/span><\/p>\n<h3><strong>19.6 Pruebas de JavaScript y actualizaciones din\u00e1micas<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Esto es especialmente importante para los formularios de pago integrados, los iframes, las interfaces BLIK\/de selecci\u00f3n bancaria y otros componentes de pago interactivos.<\/span><\/p>\n<h3><strong>19.7 Pruebe todos los m\u00e9todos de pago juntos<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Un sistema de pago que admite cinco m\u00e9todos de pago debe probarse como un sistema completo, no como cinco m\u00f3dulos aislados.<\/span><\/p>\n<h2><strong>20.0 \u00bfDeber\u00eda crear una puerta de enlace personalizada o utilizar un m\u00f3dulo existente?<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">No todas las pasarelas justifican una integraci\u00f3n personalizada. Un m\u00f3dulo personalizado tiene sentido cuando:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">La puerta de entrada es regional o de nicho.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">No existe ning\u00fan m\u00f3dulo de PrestaShop que reciba mantenimiento.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">La puerta de enlace requiere l\u00f3gica de negocio personalizada.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Necesitas un flujo de trabajo espec\u00edfico de suscripci\u00f3n o liquidaci\u00f3n.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Necesitas una funcionalidad que los m\u00f3dulos existentes no pueden proporcionar.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Pero integrar un sistema de pago tambi\u00e9n implica asumir la responsabilidad del mantenimiento. PrestaShop cambia.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">PHP cambia. Las API de la puerta de enlace cambian.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Los requisitos de seguridad cambian. Los m\u00f3dulos de pago cambian.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Y, finalmente, el proveedor de pagos cambia algo que rompe una integraci\u00f3n que, de otro modo, ser\u00eda estable.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Por lo tanto, para las pasarelas de pago convencionales, un m\u00f3dulo establecido y mantenido puede resultar significativamente m\u00e1s econ\u00f3mico que mantener un c\u00f3digo de pago personalizado durante varios a\u00f1os.<\/span><\/p>\n<h2><strong>21.0 La lecci\u00f3n m\u00e1s importante de la integraci\u00f3n de pagos de PrestaShop<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">La mayor lecci\u00f3n que se aprende al trabajar con pasarelas de pago es que la API a menudo no es la parte m\u00e1s dif\u00edcil. Enviando:<\/span><\/p>\n<pre><b>Solicitud de API <\/b><span style=\"font-weight: 400;\">\u2192 <\/span><b>Respuesta API<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Suele ser sencillo.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Lo dif\u00edcil es todo lo que lo rodea:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\u250c\u2500\u2500 <\/span><b>Reglas monetarias<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Reglas del pa\u00eds<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Cantidad del carrito<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Restricciones del transportista<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>OPC<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>JavaScript<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Iframes<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Actualizaciones AJAX<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Webhooks<\/b>\r\n<span style=\"font-weight: 400;\">\u251c\u2500\u2500 <\/span><b>Estados de orden<\/b>\r\n<span style=\"font-weight: 400;\">\u2514\u2500\u2500 <\/span><b>Notificaciones duplicadas<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>El cliente <\/b><span style=\"font-weight: 400;\">\u2192 <\/span><b>Finalizar Compra <\/b><span style=\"font-weight: 400;\">\u2192 <\/span><b>M\u00f3dulo de pago <\/b><span style=\"font-weight: 400;\">\u2192 <\/span><b>Gateway<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Creaci\u00f3n de pedidos<\/b>\r\n<span style=\"font-weight: 400;\">\u2193<\/span>\r\n<b>Confirmaci\u00f3n del pedido<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">La integraci\u00f3n de un sistema de pago solo tiene \u00e9xito cuando toda la cadena se comporta de forma coherente.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Esta es tambi\u00e9n la raz\u00f3n por la que un problema como &#8220;BLIK no est\u00e1 disponible&#8221; o &#8220;la lista de bancos no se abre&#8221; no debe tratarse inmediatamente como un problema de la API de la puerta de enlace.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La causa real podr\u00eda ser un c\u00e1lculo del total del carrito, una comprobaci\u00f3n de la elegibilidad del m\u00e9todo de pago, la representaci\u00f3n OPC, la inicializaci\u00f3n de JavaScript o una actualizaci\u00f3n AJAX que sustituya la interfaz de pago.<\/span><\/p>\n<h2><strong>22.0 Lista de verificaci\u00f3n final para una pasarela de pago personalizada de PrestaShop<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Antes de considerar que la integraci\u00f3n est\u00e1 completa, verifique:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">El m\u00f3dulo de pago se extiende<\/span> <strong>M\u00f3dulo de pago<\/strong>.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Opciones de pago <\/b><span style=\"font-weight: 400;\">Se implementa correctamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Devoluci\u00f3n de pago <\/b><span style=\"font-weight: 400;\">Se implementa donde sea necesario.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Opciones de pago utilizadas<\/span> Opciones de pago.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se comprueban las restricciones cambiarias.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se comprueban las restricciones del pa\u00eds y de la compa\u00f1\u00eda a\u00e9rea cuando corresponde.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Los totales del carrito se validan.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Las respuestas de la puerta de enlace se verifican.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Las firmas de devoluci\u00f3n de llamada se validan.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><strong>ValidarOrden()<\/strong> Se llama solo despu\u00e9s de que se haya verificado el pago correctamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">El importe utilizado para el pedido se valida con la respuesta de la pasarela de pago.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Los webhooks son idempotentes.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Las notificaciones duplicadas no generan pedidos duplicados.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se utilizan los estados de orden correcto.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Los pagos fallidos y pendientes se gestionan por separado.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Los datos de pago confidenciales nunca se registran ni se almacenan innecesariamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se exige el uso de HTTPS.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se ha probado el proceso de pago predeterminado de PrestaShop.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">OPC se ha probado por separado.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se ha probado JavaScript despu\u00e9s de actualizar la p\u00e1gina de pago mediante AJAX.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se han probado los iframes y los elementos de pago interactivos.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se han probado varios m\u00f3dulos de pago conjuntamente.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Se han probado carritos de compra realistas con descuentos y gastos de env\u00edo.<\/span><\/li>\n<\/ul>\n<h2><strong>Conclusi\u00f3n<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Una pasarela de pago personalizada en PrestaShop es m\u00e1s que una simple integraci\u00f3n de API.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La API es solo una parte de la implementaci\u00f3n. El verdadero desaf\u00edo de ingenier\u00eda comienza cuando el m\u00f3dulo de pago debe coexistir con el proceso de pago de PrestaShop, un sistema OPC como SuperCheckout, otros m\u00f3dulos de pago, JavaScript din\u00e1mico, rec\u00e1lculos del carrito y devoluciones de llamada as\u00edncronas de la pasarela de pago.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nuestra experiencia con los problemas de compatibilidad de pagos reforz\u00f3 un enfoque importante: siempre hay que aislar d\u00f3nde se produce el fallo antes de modificar el c\u00f3digo.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Si PHP no devuelve el m\u00e9todo de pago, investigue el m\u00f3dulo de pago y sus reglas de elegibilidad. Si PHP lo devuelve, pero el cliente no puede verlo, investigue el OPC y la representaci\u00f3n del frontend. Si la interfaz de usuario aparece, pero no responde, investigue JavaScript y las actualizaciones AJAX. Si el pago se realiza correctamente, pero el pedido permanece pendiente, investigue la devoluci\u00f3n de llamada y el flujo del estado del pedido.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Este enfoque es mucho m\u00e1s fiable que suponer que cada problema de pago es un problema de API.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Para los desarrolladores que trabajan en integraciones de pago para PrestaShop, el objetivo no debe ser simplemente lograr que una pasarela de pago acepte una transacci\u00f3n. El objetivo es garantizar la fiabilidad de todo el ciclo de pago, desde la primera visualizaci\u00f3n del proceso de compra hasta la confirmaci\u00f3n final del pedido, incluso cuando intervienen varios m\u00e9todos de pago y un OPC personalizado.<\/span><\/p>\n<div class=\"thecontent\">\n<div class=\"thecontent\">\n<p>Si tiene preguntas o necesita ayuda con el rendimiento o la migraci\u00f3n de su sitio web, nuestros expertos est\u00e1n aqu\u00ed para ayudarle. P\u00f3ngase en contacto con el equipo de Knowband en\u00a0<a href=\"\/es\/cdn-cgi\/l\/email-protection#e695939696899492a68d88899184878882c885898b\" target=\"_blank\" rel=\"noopener\"><span class=\"__cf_email__\" data-cfemail=\"f3808683839c8187b3989d9c8491929d97dd909c9e\">sales@costex.com<\/span><\/a> Hoy encontrar\u00e1 plugins de comercio electr\u00f3nico fiables y adaptados a sus necesidades.<\/p>\n<h2>\ud83d\udc49 <b>Explora el m\u00f3dulo con nuestra gu\u00eda en v\u00eddeo<\/b><\/h2>\n<p><iframe loading=\"lazy\" title=\"El mejor m\u00f3dulo de pago en una sola p\u00e1gina para PrestaShop (2025) | Demo oficial de Knowband\" width=\"648\" height=\"365\" src=\"https:\/\/www.youtube.com\/embed\/O_i7CbzdWd8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Integrar una pasarela de pago en PrestaShop puede parecer sencillo sobre el papel. La pasarela de pago proporciona documentaci\u00f3n de la API, credenciales de entorno de pruebas, claves de autenticaci\u00f3n, URL de devoluci\u00f3n de llamada y algunos puntos finales. El m\u00f3dulo de PrestaShop env\u00eda la solicitud de pago, recibe la respuesta, crea el pedido y [&hellip;]<\/p>\n","protected":false},"author":43,"featured_media":841346,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kbui_enabled":"","footnotes":""},"categories":[288,23233,218],"tags":[53262,53246,53248,53266,53265,53271,53282,53272,53273,53279,53263,53255,53257,53283,53259,53281,53254,53261,53260,53268,53277,53276,53264,53278,53258,53256,53247,53275,14795,12753,53229,53274,53280,53249,53267,53230,53270,53269],"class_list":["post-841314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-comercio-electronico","category-prestashop-blog-es","category-sin-categorizar","tag-api-de-pago-de-prestashop","tag-blik-prestashop","tag-comfino-prestashop","tag-compatibilidad-con-la-pasarela-de-pago","tag-compatibilidad-con-pagos-de-prestashop","tag-creacin-de-pedidos-en-prestashop","tag-desarrollo-de-pagos-para-prestashop","tag-estado-del-pedido-de-prestashop","tag-flujo-de-pago-de-prestashop","tag-formulario-de-pago-integrado","tag-integracin-de-la-api-de-la-pasarela-de-pago","tag-integracin-de-la-api-de-prestashop","tag-integracin-de-la-pasarela-de-pago-de-prestashop","tag-integracin-de-la-pasarela-de-prestashop","tag-integracin-de-pagos-de-prestashop","tag-integracin-de-pagos-personalizada","tag-mtodos-de-pago-de-prestashop","tag-mdulo-de-pago-de-prestashop","tag-mdulo-de-pago-personalizado-de-prestashop","tag-opciones-de-pago-de-prestashop","tag-pago-con-ajax-de-prestashop","tag-pago-con-javascript-en-prestashop","tag-pago-de-prestashop","tag-pago-mediante-iframe-de-prestashop","tag-pasarela-de-pago-personalizada-prestashop","tag-pasarela-de-pago-prestashop","tag-payu-prestashop","tag-personalizacin-del-proceso-de-pago-de-prestashop","tag-prestashop-one-page-checkout","tag-prestashop-opc","tag-procesamiento-de-pagos-de-prestashop","tag-seguridad-de-pago-de-prestashop","tag-simplylease-prestashop","tag-solucin-de-problemas-de-pago-de-prestashop","tag-supercheckout-prestashop","tag-webhooks-de-pasarela-de-pago","tag-webhooks-de-prestashop"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC<\/title>\n<meta name=\"description\" content=\"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC\" \/>\n<meta property=\"og:description\" content=\"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowband Blog | Ecommerce Modules\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Knowband\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-10T12:18:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-30T08:35:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"760\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sophie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@KnowbandPlugin\" \/>\n<meta name=\"twitter:site\" content=\"@KnowbandPlugin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sophie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/\"},\"author\":{\"name\":\"Sophie\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/person\\\/ca485d026e41cbf45ae99b67d0c9ac74\"},\"headline\":\"Integraci\u00f3n de una pasarela de pago personalizada en PrestaShop: requisitos t\u00e9cnicos, flujo de la API y desaf\u00edos reales de OPC\",\"datePublished\":\"2026-09-10T12:18:52+00:00\",\"dateModified\":\"2026-09-30T08:35:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/\"},\"wordCount\":4610,\"publisher\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Spanish-1.jpg\",\"keywords\":[\"API de pago de PrestaShop\",\"BLIK PrestaShop\",\"Comfino PrestaShop\",\"compatibilidad con la pasarela de pago\",\"Compatibilidad con pagos de PrestaShop\",\"Creaci\u00f3n de pedidos en PrestaShop\",\"Desarrollo de pagos para PrestaShop\",\"Estado del pedido de PrestaShop\",\"Flujo de pago de PrestaShop\",\"formulario de pago integrado\",\"Integraci\u00f3n de la API de la pasarela de pago\",\"Integraci\u00f3n de la API de PrestaShop\",\"Integraci\u00f3n de la pasarela de pago de PrestaShop\",\"Integraci\u00f3n de la pasarela de PrestaShop\",\"Integraci\u00f3n de pagos de PrestaShop\",\"integraci\u00f3n de pagos personalizada\",\"M\u00e9todos de pago de PrestaShop\",\"M\u00f3dulo de pago de PrestaShop\",\"M\u00f3dulo de pago personalizado de PrestaShop\",\"Opciones de pago de PrestaShop\",\"Pago con AJAX de PrestaShop\",\"Pago con JavaScript en PrestaShop\",\"Pago de PrestaShop\",\"Pago mediante iframe de PrestaShop\",\"Pasarela de pago personalizada PrestaShop\",\"pasarela de pago PrestaShop\",\"PayU PrestaShop\",\"Personalizaci\u00f3n del proceso de pago de PrestaShop\",\"Prestashop One page checkout\",\"Prestashop One page checkout\",\"PrestaShop OPC\",\"Procesamiento de pagos de PrestaShop\",\"Seguridad de pago de PrestaShop\",\"SimplyLease PrestaShop\",\"Soluci\u00f3n de problemas de pago de PrestaShop\",\"SuperCheckout PrestaShop\",\"webhooks de pasarela de pago\",\"webhooks de PrestaShop\"],\"articleSection\":[\"comercio electr\u00f3nico\",\"Prestashop\",\"Sin categorizar\"],\"inLanguage\":\"es-ES\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/\",\"name\":\"Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Spanish-1.jpg\",\"datePublished\":\"2026-09-10T12:18:52+00:00\",\"dateModified\":\"2026-09-30T08:35:29+00:00\",\"description\":\"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#breadcrumb\"},\"inLanguage\":\"es-ES\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es-ES\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Spanish-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Spanish-1.jpg\",\"width\":760,\"height\":300,\"caption\":\"Entender la integraci\u00f3n de pasarelas de pago personalizadas y la compatibilidad con OPC en PrestaShop\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/prestashop-blog-es\\\/prestashop-payment-gateway-integration\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integraci\u00f3n de una pasarela de pago personalizada en PrestaShop: requisitos t\u00e9cnicos, flujo de la API y desaf\u00edos reales de OPC\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\",\"name\":\"Knowband Blog | Ecommerce Modules\",\"description\":\"Magento, Prestashop, Opencart, Shopify\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es-ES\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#organization\",\"name\":\"Knowband Blog | Ecommerce Modules\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es-ES\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/cropped-knowband_logo-v2.png\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/cropped-knowband_logo-v2.png\",\"width\":153,\"height\":61,\"caption\":\"Knowband Blog | Ecommerce Modules\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Knowband\",\"https:\\\/\\\/x.com\\\/KnowbandPlugin\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/fr\\\/#\\\/schema\\\/person\\\/ca485d026e41cbf45ae99b67d0c9ac74\",\"name\":\"Sophie\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es-ES\",\"@id\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/plugins\\\/wp-user-avatar\\\/deprecated\\\/wp-user-avatar\\\/images\\\/wpua-96x96.png\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/plugins\\\/wp-user-avatar\\\/deprecated\\\/wp-user-avatar\\\/images\\\/wpua-96x96.png\",\"contentUrl\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/wp-content\\\/plugins\\\/wp-user-avatar\\\/deprecated\\\/wp-user-avatar\\\/images\\\/wpua-96x96.png\",\"caption\":\"Sophie\"},\"description\":\"We are experts in the eCommerce industry, specializing in high-quality plugin development. With years of experience, we deliver reliable and feature-rich modules for platforms such as Magento, PrestaShop, OpenCart, and Shopify. In addition to ready-made plugins, we also provide custom module development and tailored modification services to meet unique business needs. Our team stays ahead of industry trends, ensuring every solution we build enhances store performance, user experience, and overall functionality. With a strong customer-centric approach, we have become a trusted partner for businesses seeking powerful and scalable eCommerce plugin solutions.\",\"url\":\"https:\\\/\\\/www.knowband.com\\\/blog\\\/es\\\/author\\\/titiksha-dwivedi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC","description":"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/","og_locale":"es_ES","og_type":"article","og_title":"Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC","og_description":"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.","og_url":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/","og_site_name":"Knowband Blog | Ecommerce Modules","article_publisher":"https:\/\/www.facebook.com\/Knowband","article_published_time":"2026-09-10T12:18:52+00:00","article_modified_time":"2026-09-30T08:35:29+00:00","og_image":[{"width":760,"height":300,"url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg","type":"image\/jpeg"}],"author":"Sophie","twitter_card":"summary_large_image","twitter_creator":"@KnowbandPlugin","twitter_site":"@KnowbandPlugin","twitter_misc":{"Written by":"Sophie","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#article","isPartOf":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/"},"author":{"name":"Sophie","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/person\/ca485d026e41cbf45ae99b67d0c9ac74"},"headline":"Integraci\u00f3n de una pasarela de pago personalizada en PrestaShop: requisitos t\u00e9cnicos, flujo de la API y desaf\u00edos reales de OPC","datePublished":"2026-09-10T12:18:52+00:00","dateModified":"2026-09-30T08:35:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/"},"wordCount":4610,"publisher":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg","keywords":["API de pago de PrestaShop","BLIK PrestaShop","Comfino PrestaShop","compatibilidad con la pasarela de pago","Compatibilidad con pagos de PrestaShop","Creaci\u00f3n de pedidos en PrestaShop","Desarrollo de pagos para PrestaShop","Estado del pedido de PrestaShop","Flujo de pago de PrestaShop","formulario de pago integrado","Integraci\u00f3n de la API de la pasarela de pago","Integraci\u00f3n de la API de PrestaShop","Integraci\u00f3n de la pasarela de pago de PrestaShop","Integraci\u00f3n de la pasarela de PrestaShop","Integraci\u00f3n de pagos de PrestaShop","integraci\u00f3n de pagos personalizada","M\u00e9todos de pago de PrestaShop","M\u00f3dulo de pago de PrestaShop","M\u00f3dulo de pago personalizado de PrestaShop","Opciones de pago de PrestaShop","Pago con AJAX de PrestaShop","Pago con JavaScript en PrestaShop","Pago de PrestaShop","Pago mediante iframe de PrestaShop","Pasarela de pago personalizada PrestaShop","pasarela de pago PrestaShop","PayU PrestaShop","Personalizaci\u00f3n del proceso de pago de PrestaShop","Prestashop One page checkout","Prestashop One page checkout","PrestaShop OPC","Procesamiento de pagos de PrestaShop","Seguridad de pago de PrestaShop","SimplyLease PrestaShop","Soluci\u00f3n de problemas de pago de PrestaShop","SuperCheckout PrestaShop","webhooks de pasarela de pago","webhooks de PrestaShop"],"articleSection":["comercio electr\u00f3nico","Prestashop","Sin categorizar"],"inLanguage":"es-ES"},{"@type":"WebPage","@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/","url":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/","name":"Integraci\u00f3n de pasarela de pago en PrestaShop: Gu\u00eda de API y OPC","isPartOf":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#primaryimage"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg","datePublished":"2026-09-10T12:18:52+00:00","dateModified":"2026-09-30T08:35:29+00:00","description":"Aprende a integrar una pasarela de pago personalizada en PrestaShop, gestionar API, webhooks y estados de pedido, as\u00ed como a solucionar problemas de compatibilidad con OPC.","breadcrumb":{"@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#breadcrumb"},"inLanguage":"es-ES","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/"]}]},{"@type":"ImageObject","inLanguage":"es-ES","@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#primaryimage","url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2026\/09\/Spanish-1.jpg","width":760,"height":300,"caption":"Entender la integraci\u00f3n de pasarelas de pago personalizadas y la compatibilidad con OPC en PrestaShop"},{"@type":"BreadcrumbList","@id":"https:\/\/www.knowband.com\/blog\/es\/prestashop-blog-es\/prestashop-payment-gateway-integration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knowband.com\/blog\/fr\/"},{"@type":"ListItem","position":2,"name":"Integraci\u00f3n de una pasarela de pago personalizada en PrestaShop: requisitos t\u00e9cnicos, flujo de la API y desaf\u00edos reales de OPC"}]},{"@type":"WebSite","@id":"https:\/\/www.knowband.com\/blog\/fr\/#website","url":"https:\/\/www.knowband.com\/blog\/fr\/","name":"Knowband Blog | Ecommerce Modules","description":"Magento, Prestashop, Opencart, Shopify","publisher":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knowband.com\/blog\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es-ES"},{"@type":"Organization","@id":"https:\/\/www.knowband.com\/blog\/fr\/#organization","name":"Knowband Blog | Ecommerce Modules","url":"https:\/\/www.knowband.com\/blog\/fr\/","logo":{"@type":"ImageObject","inLanguage":"es-ES","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2016\/09\/cropped-knowband_logo-v2.png","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/uploads\/2016\/09\/cropped-knowband_logo-v2.png","width":153,"height":61,"caption":"Knowband Blog | Ecommerce Modules"},"image":{"@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Knowband","https:\/\/x.com\/KnowbandPlugin"]},{"@type":"Person","@id":"https:\/\/www.knowband.com\/blog\/fr\/#\/schema\/person\/ca485d026e41cbf45ae99b67d0c9ac74","name":"Sophie","image":{"@type":"ImageObject","inLanguage":"es-ES","@id":"https:\/\/www.knowband.com\/blog\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png","url":"https:\/\/www.knowband.com\/blog\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png","contentUrl":"https:\/\/www.knowband.com\/blog\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png","caption":"Sophie"},"description":"We are experts in the eCommerce industry, specializing in high-quality plugin development. With years of experience, we deliver reliable and feature-rich modules for platforms such as Magento, PrestaShop, OpenCart, and Shopify. In addition to ready-made plugins, we also provide custom module development and tailored modification services to meet unique business needs. Our team stays ahead of industry trends, ensuring every solution we build enhances store performance, user experience, and overall functionality. With a strong customer-centric approach, we have become a trusted partner for businesses seeking powerful and scalable eCommerce plugin solutions.","url":"https:\/\/www.knowband.com\/blog\/es\/author\/titiksha-dwivedi\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/posts\/841314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=841314"}],"version-history":[{"count":4,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/posts\/841314\/revisions"}],"predecessor-version":[{"id":841861,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/posts\/841314\/revisions\/841861"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/media\/841346"}],"wp:attachment":[{"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=841314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=841314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knowband.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=841314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}