{"id":376480,"date":"2023-04-17T05:20:14","date_gmt":"2023-04-17T05:20:14","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=376480"},"modified":"2023-04-24T06:19:30","modified_gmt":"2023-04-24T06:19:30","slug":"how-to-create-opencart-payment-extension","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/","title":{"rendered":"How to create a payment extension in Opencart ?"},"content":{"rendered":"\n<p>This blog describes how a developer can create a new Payment extension in Opencart version 3.0.3.8.<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:#626466\"><em>Nowadays Online payment systems play an vital role which is like a backbone in e-commerce<\/em>. <em>In simple terms, payment processing refers to&nbsp;<strong>accepting and handling customer payments<\/strong>. This process includes various steps, such as capturing payment information, authorization of the transaction, and transferring funds from the customer&#8217;s account to the merchant&#8217;s account. It builds trust between merchants and customers.<\/em><\/p>\n\n\n\n<p>Opencart itself offers a variety of <a href=\"https:\/\/www.opencart.com\/index.php?route=marketplace\/extension&amp;filter_category_id=3\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">core payment methods<\/a> such as bank transfers, 2Checkout, Cash On Delivery, and some Online Payment methods. Here You can check the list of our <a href=\"https:\/\/store.webkul.com\/OpenCart-Modules\/Payment.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Payment Extensions.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Before making a payment extension, the things that you need to know  <\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>how to create a <a href=\"https:\/\/webkul.com\/blog\/create-first-basic-module-opencart\/#:~:text=For%20Opencart%20version%202.3.,%2D%3Eenglish%2D%3Emodule.\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">new extension<\/a> in Opencart <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create an account at the payment gateway and gather all the necessary and vital information about the payment like the API documentation, API keys, and other credentials required to integrate that payment method.<\/li>\n<\/ul>\n\n\n\n<p>In Opencart, extensions are of various types. Because we want to create a payment extension, our extension will be of type&nbsp;<strong>&#8220;payment&#8221;<\/strong>. <\/p>\n\n\n\n<p><strong>first of all, you have to make directory Structure like :<\/strong><\/p>\n\n\n\n<p>For payment extension, All the files are required (except admin\/model\/extension\/payment\/first_payment.php) and should be arranged in the same hierarchical manner.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\"><img decoding=\"async\" width=\"944\" height=\"570\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\" alt=\"directory\" class=\"wp-image-377555\" title=\"fill-content\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png 944w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory-300x181.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory-250x151.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory-768x464.png 768w\" sizes=\"(max-width: 944px) 100vw, 944px\" loading=\"lazy\" \/><\/a><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Let&#8217;s start Building Payment File for Admin End<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Controller file <\/strong>&#8211; At the beginning of development, create a payment controller file with the name &#8220;first_payment.php&#8221; inside the folder &#8220;admin\/controller\/extension\/payment&#8221;.<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\">  \n  &lt;?php\n  \/**\n  * Webkul Software.\n  *\n  * @category Webkul\n  * @package Opencart Module Tutorial\n  * @author Webkul\n  * @license https:\/\/store.webkul.com\/license.html\n  *\/\nclass ControllerExtensionPaymentFirstPayment extends Controller {\n\tprivate $error = array();\n\n\tpublic function index() {\n\t\t$this-&gt;load-&gt;language(&#039;extension\/payment\/first_payment&#039;);\n        \n\t\t\/\/heading title\n\t\t$this-&gt;document-&gt;setTitle($this-&gt;language-&gt;get(&#039;heading_title&#039;));\n\n\t\t$this-&gt;load-&gt;model(&#039;setting\/setting&#039;);\n\t\n\t\tif(($this-&gt;request-&gt;server&#091;&#039;REQUEST_METHOD&#039;] == &#039;POST&#039;) &amp;&amp; $this-&gt;validate()) { \n\t\t\t$this-&gt;model_setting_setting-&gt;editSetting(&#039;payment_first_payment&#039;, $this-&gt;request-&gt;post);\n\n\t\t\t$this-&gt;session-&gt;data&#091;&#039;success&#039;] = $this-&gt;language-&gt;get(&#039;text_success&#039;);\n\n\t\t\t$this-&gt;response-&gt;redirect($this-&gt;url-&gt;link(&#039;marketplace\/extension&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;] . &#039;&amp;type=payment&#039;, true));\n\t\t}\n\n\t\tif (isset($this-&gt;error&#091;&#039;warning&#039;])) {\n\t\t\t$data&#091;&#039;error_warning&#039;] = $this-&gt;error&#091;&#039;warning&#039;];\n\t\t} else {\n\t\t\t$data&#091;&#039;error_warning&#039;] = &#039;&#039;;\n\t\t}\n\n        \/\/ breadcrumbs\n\t\t$data&#091;&#039;breadcrumbs&#039;] = array();\n\n\t\t$data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n\t\t\t&#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;text_home&#039;),\n\t\t\t&#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;common\/dashboard&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true)\n\t\t);\n\n\t\t$data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n\t\t\t&#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;text_extension&#039;),\n\t\t\t&#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;marketplace\/extension&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;] . &#039;&amp;type=payment&#039;, true)\n\t\t);\n\n\t\t$data&#091;&#039;breadcrumbs&#039;]&#091;] = array(\n\t\t\t&#039;text&#039; =&gt; $this-&gt;language-&gt;get(&#039;heading_title&#039;),\n\t\t\t&#039;href&#039; =&gt; $this-&gt;url-&gt;link(&#039;extension\/payment\/first_payment&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true)\n\t\t);\n\n        \/\/ payment action mode\n\t\t$data&#091;&#039;action&#039;] = $this-&gt;url-&gt;link(&#039;extension\/payment\/first_payment&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;], true);\n\n\t\t$data&#091;&#039;cancel&#039;] = $this-&gt;url-&gt;link(&#039;marketplace\/extension&#039;, &#039;user_token=&#039; . $this-&gt;session-&gt;data&#091;&#039;user_token&#039;] . &#039;&amp;type=payment&#039;, true);\n\n\t\tif (isset($this-&gt;request-&gt;post&#091;&#039;payment_first_payment_status&#039;])) {\n\t\t\t$data&#091;&#039;payment_first_payment_status&#039;] = $this-&gt;request-&gt;post&#091;&#039;payment_first_payment_status&#039;];\n\t\t} else {\n\t\t\t$data&#091;&#039;payment_first_payment_status&#039;] = $this-&gt;config-&gt;get(&#039;payment_first_payment_status&#039;);\n\t\t}\n\n\t\t$this-&gt;load-&gt;model(&#039;localisation\/order_status&#039;);\n\n\t\t$data&#091;&#039;order_statuses&#039;] = $this-&gt;model_localisation_order_status-&gt;getOrderStatuses();\n\n\t\tif (isset($this-&gt;request-&gt;post&#091;&#039;payment_first_payment_order_status_id&#039;])) {\n\t\t\t$data&#091;&#039;payment_first_payment_order_status_id&#039;] = $this-&gt;request-&gt;post&#091;&#039;payment_first_payment_order_status_id&#039;];\n\t\t} else {\n\t\t\t$data&#091;&#039;payment_first_payment_order_status_id&#039;] = $this-&gt;config-&gt;get(&#039;payment_first_payment_order_status_id&#039;);\n\t\t}\n\n\t\t$this-&gt;load-&gt;model(&#039;localisation\/geo_zone&#039;);\n\n\t\t$data&#091;&#039;geo_zones&#039;] = $this-&gt;model_localisation_geo_zone-&gt;getGeoZones();\n\n\t\tif (isset($this-&gt;request-&gt;post&#091;&#039;payment_first_payment_geo_zone_id&#039;])) {\n\t\t\t$data&#091;&#039;payment_first_payment_geo_zone_id&#039;] = $this-&gt;request-&gt;post&#091;&#039;payment_first_payment_geo_zone_id&#039;];\n\t\t} else {\n\t\t\t$data&#091;&#039;payment_first_payment_geo_zone_id&#039;] = $this-&gt;config-&gt;get(&#039;payment_first_payment_geo_zone_id&#039;);\n\t\t}\n\n\t\tif (isset($this-&gt;request-&gt;post&#091;&#039;payment_first_payment_sort_order&#039;])) {\n\t\t\t$data&#091;&#039;payment_first_payment_sort_order&#039;] = $this-&gt;request-&gt;post&#091;&#039;payment_first_payment_sort_order&#039;];\n\t\t} else {\n\t\t\t$data&#091;&#039;payment_first_payment_sort_order&#039;] = $this-&gt;config-&gt;get(&#039;payment_first_payment_sort_order&#039;);\n\t\t}\n\n\t\t$data&#091;&#039;header&#039;] = $this-&gt;load-&gt;controller(&#039;common\/header&#039;);\n\t\t$data&#091;&#039;column_left&#039;] = $this-&gt;load-&gt;controller(&#039;common\/column_left&#039;);\n\t\t$data&#091;&#039;footer&#039;] = $this-&gt;load-&gt;controller(&#039;common\/footer&#039;);\n\n\t\t$this-&gt;response-&gt;setOutput($this-&gt;load-&gt;view(&#039;extension\/payment\/first_payment&#039;, $data));\n\t}\n\n\tprotected function validate() {\n\t\tif (!$this-&gt;user-&gt;hasPermission(&#039;modify&#039;, &#039;extension\/payment\/first_payment&#039;)) {\n\t\t\t$this-&gt;error&#091;&#039;warning&#039;] = $this-&gt;language-&gt;get(&#039;error_permission&#039;);\n\t\t}\n\t\treturn !$this-&gt;error;\n\t}\n }<\/pre>\n\n\n\n<p>2. <strong>Language file<\/strong> &#8211; We\u2019ll need more entries inside our language to display input form errors and placeholders and labels and buttons. So just overwrite&nbsp;&#8220;admin\/language\/en-gb\/extension\/payment\/first_payment.php&#8221;&nbsp;with this.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> \n&lt;?php\n  \/**\n  * Webkul Software.\n  *\n  * @category Webkul\n  * @package Opencart Module Tutorial\n  * @author Webkul\n  * @license https:\/\/store.webkul.com\/license.html\n  *\/\n\/\/ Heading\n$_&#091;&#039;heading_title&#039;]      = &#039;First Payment&#039;;\n\n\/\/ Text\n$_&#091;&#039;text_extension&#039;]     = &#039;Extensions&#039;;\n$_&#091;&#039;text_success&#039;]       = &#039;Success: You have modified First Payment details!&#039;;\n$_&#091;&#039;text_edit&#039;]          = &#039;Edit First Payment&#039;;\n\n\/\/ Entry\n$_&#091;&#039;entry_order_status&#039;] = &#039;Order Status&#039;;\n$_&#091;&#039;entry_geo_zone&#039;]     = &#039;Geo Zone&#039;;\n$_&#091;&#039;entry_status&#039;]       = &#039;Status&#039;;\n$_&#091;&#039;entry_sort_order&#039;]   = &#039;Sort Order&#039;;\n\n\/\/ Help\n$_&#091;&#039;help_total&#039;]         = &#039;The checkout total the order must reach before this payment method becomes active.&#039;; \n\n\/\/ Error \n$_&#091;&#039;error_permission&#039;]   = &#039;Warning: You do not have permission to modify First Payment!&#039;;<\/pre>\n\n\n\n<p>3. <strong>View file<\/strong> &#8211; Create layout at admin end using twig file &#8220;admin\/view\/template\/extension\/first_payment.twig&#8221;, consider all the required fields for the payment method configuration.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;!-- \n\/**\n * Webkul Software.\n *\n * @category Webkul\n * @package Opencart Module Tutorial\n * @author Webkul\n * @license https:\/\/store.webkul.com\/license.html\n *\/\n --&gt;\n\n {{ header }}{{ column_left }}\n&lt;div id=&quot;content&quot;&gt;\n  &lt;div class=&quot;page-header&quot;&gt;\n    &lt;div class=&quot;container-fluid&quot;&gt;\n      &lt;div class=&quot;pull-right&quot;&gt;\n        &lt;button type=&quot;submit&quot; form=&quot;form-payment&quot; data-toggle=&quot;tooltip&quot; title=&quot;{{ button_save }}&quot; class=&quot;btn btn-primary&quot;&gt;&lt;i class=&quot;fa fa-save&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n        &lt;a href=&quot;{{ cancel }}&quot; data-toggle=&quot;tooltip&quot; title=&quot;{{ button_cancel }}&quot; class=&quot;btn btn-default&quot;&gt;&lt;i class=&quot;fa fa-reply&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;\/div&gt;\n      &lt;h1&gt;{{ heading_title }}&lt;\/h1&gt;\n      &lt;ul class=&quot;breadcrumb&quot;&gt;\n        {% for breadcrumb in breadcrumbs %}\n        &lt;li&gt;&lt;a href=&quot;{{ breadcrumb.href }}&quot;&gt;{{ breadcrumb.text }}&lt;\/a&gt;&lt;\/li&gt;\n        {% endfor %}\n      &lt;\/ul&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;container-fluid&quot;&gt;\n    {% if error_warning %}\n    &lt;div class=&quot;alert alert-danger alert-dismissible&quot;&gt;&lt;i class=&quot;fa fa-exclamation-circle&quot;&gt;&lt;\/i&gt; {{ error_warning }}\n      &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot;&gt;&amp;times;&lt;\/button&gt;\n    &lt;\/div&gt;\n    {% endif %}\n    &lt;div class=&quot;panel panel-default&quot;&gt;\n      &lt;div class=&quot;panel-heading&quot;&gt;\n        &lt;h3 class=&quot;panel-title&quot;&gt;&lt;i class=&quot;fa fa-pencil&quot;&gt;&lt;\/i&gt; {{ text_edit }}&lt;\/h3&gt;\n      &lt;\/div&gt;\n      &lt;div class=&quot;panel-body&quot;&gt;\n        &lt;form action=&quot;{{ action }}&quot; method=&quot;post&quot; enctype=&quot;multipart\/form-data&quot; id=&quot;form-payment&quot; class=&quot;form-horizontal&quot;&gt;\n           &lt;div class=&quot;form-group&quot;&gt;\n            &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-status&quot;&gt;{{ entry_status }}&lt;\/label&gt;\n            &lt;div class=&quot;col-sm-10&quot;&gt;\n              &lt;select name=&quot;payment_first_payment_status&quot; id=&quot;input-status&quot; class=&quot;form-control&quot;&gt;\n                {% if payment_first_payment_status %}\n                &lt;option value=&quot;1&quot; selected=&quot;selected&quot;&gt;{{ text_enabled }}&lt;\/option&gt;\n                &lt;option value=&quot;0&quot;&gt;{{ text_disabled }}&lt;\/option&gt;\n                {% else %}\n                &lt;option value=&quot;1&quot;&gt;{{ text_enabled }}&lt;\/option&gt;\n                &lt;option value=&quot;0&quot; selected=&quot;selected&quot;&gt;{{ text_disabled }}&lt;\/option&gt;\n                {% endif %}\n              &lt;\/select&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;\n          &lt;div class=&quot;form-group&quot;&gt;\n            &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-order-status&quot;&gt;{{ entry_order_status }}&lt;\/label&gt;\n            &lt;div class=&quot;col-sm-10&quot;&gt;\n              &lt;select name=&quot;payment_first_payment_order_status_id&quot; id=&quot;input-order-status&quot; class=&quot;form-control&quot;&gt;\n                {% for order_status in order_statuses %}\n                {% if order_status.order_status_id == payment_first_payment_order_status_id %}\n                &lt;option value=&quot;{{ order_status.order_status_id }}&quot; selected=&quot;selected&quot;&gt;{{ order_status.name }}&lt;\/option&gt;\n                {% else %}\n                &lt;option value=&quot;{{ order_status.order_status_id }}&quot;&gt;{{ order_status.name }}&lt;\/option&gt;\n                {% endif %}\n                {% endfor %}\n              &lt;\/select&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;\n          &lt;div class=&quot;form-group&quot;&gt;\n            &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-geo-zone&quot;&gt;{{ entry_geo_zone }}&lt;\/label&gt;\n            &lt;div class=&quot;col-sm-10&quot;&gt;\n              &lt;select name=&quot;payment_first_payment_geo_zone_id&quot; id=&quot;input-geo-zone&quot; class=&quot;form-control&quot;&gt;\n                &lt;option value=&quot;0&quot;&gt;{{ text_all_zones }}&lt;\/option&gt;\n                {% for geo_zone in geo_zones %}\n                {% if geo_zone.geo_zone_id == payment_first_payment_geo_zone_id %}\n                &lt;option value=&quot;{{ geo_zone.geo_zone_id }}&quot; selected=&quot;selected&quot;&gt;{{ geo_zone.name }}&lt;\/option&gt;\n                {% else %}\n                &lt;option value=&quot;{{ geo_zone.geo_zone_id }}&quot;&gt;{{ geo_zone.name }}&lt;\/option&gt;\n                {% endif %}\n                {% endfor %}\n              &lt;\/select&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;     \n          &lt;div class=&quot;form-group&quot;&gt;\n            &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-sort-order&quot;&gt;{{ entry_sort_order }}&lt;\/label&gt;\n            &lt;div class=&quot;col-sm-10&quot;&gt;\n              &lt;input type=&quot;text&quot; name=&quot;payment_first_payment_sort_order&quot; value=&quot;{{ payment_first_payment_sort_order }}&quot; placeholder=&quot;{{ entry_sort_order }}&quot; id=&quot;input-sort-order&quot; class=&quot;form-control&quot; \/&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;\n        &lt;\/form&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n{{ footer }}<\/pre>\n\n\n\n<p>So, we have completed building our first payment module. now, we will&nbsp;install this by heading to&nbsp;<strong>Extensions-&gt; Extensions-&gt; Payment -&gt; First payment<\/strong>&nbsp;from the admin panel, and after installing you can configure the payment module by enabling it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation.png\"><img decoding=\"async\" width=\"1200\" height=\"589\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation-1200x589.png\" alt=\"installation\" class=\"wp-image-377480\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation-1200x589.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation-300x147.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation-250x123.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation-768x377.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/installation.png 1229w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"419\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view-1200x419.png\" alt=\"view\" class=\"wp-image-377500\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view-1200x419.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view-300x105.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view-250x87.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view-768x268.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/view.png 1289w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Let&#8217;s start Building Payment File for Front End<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Controller File<\/strong> &#8211;  All the necessary methods (including index) will be kept in the controller file &#8220;catalog\/controller\/extension\/payment\/first_payment.php&#8221;.<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\"> &lt;?php\n  \/**\n  * Webkul Software.\n  *\n  * @category Webkul\n  * @package Opencart Module Tutorial\n  * @author Webkul\n  * @license https:\/\/store.webkul.com\/license.html\n  *\/\n \n  class ControllerExtensionPaymentFirstPayment extends Controller {\n\tpublic function index() {\n\t\t$data = array();\n\t\t$this-&gt;load-&gt;language(&#039;extension\/payment\/first_payment&#039;);\n\n       \treturn $this-&gt;load-&gt;view(&#039;extension\/payment\/first_payment&#039;, $data);\n\t}\n\n\tpublic function send() {\n\t\t    $json = array();\n\t        if(isset($this-&gt;session-&gt;data&#091;&#039;payment_method&#039;]&#091;&#039;code&#039;]) &amp;&amp; $this-&gt;session-&gt;data&#091;&#039;payment_method&#039;]&#091;&#039;code&#039;] == &#039;first_payment&#039;) {\n\t\t\t$this-&gt;load-&gt;language(&#039;extension\/payment\/first_payment&#039;);\n\t\n\t\t\t$this-&gt;load-&gt;model(&#039;checkout\/order&#039;);\n\t\n\t\t\t$this-&gt;model_checkout_order-&gt;addOrderHistory($this-&gt;session-&gt;data&#091;&#039;order_id&#039;], $this-&gt;config-&gt;get(&#039;payment_first_payment_order_status_id&#039;),&#039;&#039;, true);\n\t\t\t\n\t\t\t$json&#091;&#039;redirect&#039;] = $this-&gt;url-&gt;link(&#039;checkout\/success&#039;);\n\t\t\t}\n\t\t\t\n\t\t\t$this-&gt;response-&gt;addHeader(&#039;Content-Type: application\/json&#039;);\n\t\t\t$this-&gt;response-&gt;setOutput(json_encode($json));\t\t\n\t    }\n\t\t\n\t}<\/pre>\n\n\n\n<p class=\"has-medium-font-size\">2. <strong>Language File<\/strong> &#8211; For add text, inputs, placeholders for front end, will include same as admin-end at path &#8220;catalog\/language\/en-gb\/extension\/payment\/first_payment.php&#8221;.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n \/**\n  * Webkul Software.\n  *\n  * @category Webkul\n  * @package Opencart Module Tutorial\n  * @author Webkul\n  * @license https:\/\/store.webkul.com\/license.html\n  *\/\n\/\/ Text\n$_&#091;&#039;text_title&#039;]         = &#039;First Payment&#039;;\n$_&#091;&#039;text_desciption&#039;]    = &#039;Please transfer the total amount to the following bank account 9746737733&#039;;\n$_&#091;&#039;text_notice&#039;]        = &#039;Your order will not ship until we receive payment.&#039;;<\/pre>\n\n\n\n<p>3. <strong>Model file <\/strong>&#8211; All the data operations for the payment method can be managed by using the model file &#8220;catalog\/model\/extension\/payment\/first_payment.php&#8221; .<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> &lt;?php\n \/**\n  * Webkul Software.\n  *\n  * @category Webkul\n  * @package Opencart Module Tutorial\n  * @author Webkul\n  * @license https:\/\/store.webkul.com\/license.html\n  *\/\n class ModelExtensionPaymentFirstPayment extends Model {\n\tpublic function getMethod($address, $total) {\n\t\t$this-&gt;load-&gt;language(&#039;extension\/payment\/first_payment&#039;);\n\n\t\t$query = $this-&gt;db-&gt;query(&quot;SELECT * FROM &quot; . DB_PREFIX . &quot;zone_to_geo_zone WHERE geo_zone_id = &#039;&quot; . (int)$this-&gt;config-&gt;get(&#039;payment_first_payment_geo_zone_id&#039;) . &quot;&#039; AND country_id = &#039;&quot; . (int)$address&#091;&#039;country_id&#039;] . &quot;&#039; AND (zone_id = &#039;&quot; . (int)$address&#091;&#039;zone_id&#039;] . &quot;&#039; OR zone_id = &#039;0&#039;)&quot;);\n\n\t\tif ($this-&gt;config-&gt;get(&#039;payment_first_payment_total&#039;) &gt; 0 &amp;&amp; $this-&gt;config-&gt;get(&#039;payment_first_payment_total&#039;) &gt; $total) {\n\t\t\t$status = false;\n\t\t} elseif (!$this-&gt;config-&gt;get(&#039;payment_first_payment_geo_zone_id&#039;)) {\n\t\t\t$status = true;\n\t\t} elseif ($query-&gt;num_rows) {\n\t\t\t$status = true;\n\t\t} else {\n\t\t\t$status = false;\n\t\t}\n\n\t\t$method_data = array();\n\n\t\tif ($status) {\n\t\t\t$method_data = array(\n\t\t\t\t&#039;code&#039;       =&gt; &#039;first_payment&#039;,\n\t\t\t\t&#039;title&#039;      =&gt; $this-&gt;language-&gt;get(&#039;text_title&#039;),\n\t\t\t\t&#039;terms&#039;      =&gt; &#039;&#039;,\n\t\t\t\t&#039;sort_order&#039; =&gt; $this-&gt;config-&gt;get(&#039;payment_first_payment_sort_order&#039;)\n\t\t\t);\n\t\t}\n\n\t\treturn $method_data;\n\t}\n}<\/pre>\n\n\n\n<p>4. <strong>View File<\/strong> &#8211; Create web end layout for the payment method using catalog\/view\/theme\/(theme_name or default)\/template\/extension\/payment\/first_payment.twig. We can use it while placing an order.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> &lt;!-- \n \/**\n * Webkul Software.\n *\n * @category Webkul\n * @package Opencart Module Tutorial\n * @author Webkul\n * @license https:\/\/store.webkul.com\/license.html\n *\/\n --&gt;\n &lt;h2&gt;{{ text_title }}&lt;\/h2&gt;\n&lt;div class=&quot;well well-sm&quot;&gt;\n  &lt;p&gt;{{ text_desciption }}&lt;\/p&gt;\n  &lt;p&gt;{{ text_notice }}&lt;\/p&gt;\n&lt;\/div&gt;\n\n&lt;div class=&quot;buttons&quot;&gt;\n  &lt;div class=&quot;pull-right&quot;&gt;\n    &lt;input type=&quot;button&quot; value=&quot;{{ button_confirm }}&quot; id=&quot;button-confirm&quot; data-loading-text=&quot;{{ text_loading }}&quot; class=&quot;btn btn-primary&quot; \/&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;&lt;!--\n$(&#039;#button-confirm&#039;).on(&#039;click&#039;, function() {\n\t$.ajax({\n\t\turl: &#039;index.php?route=extension\/payment\/first_payment\/send&#039;,\n\t\tdataType: &#039;json&#039;,\n\t\tbeforeSend: function() {\n\t\t\t$(&#039;#button-confirm&#039;).button(&#039;loading&#039;);\n\t\t},\n\t\tcomplete: function() {\n\t\t\t$(&#039;#button-confirm&#039;).button(&#039;reset&#039;);\n\t\t},\n\t\tsuccess: function(json) {\n\t\t\tif (json&#091;&#039;redirect&#039;]) {\n\t\t\t\tlocation = json&#091;&#039;redirect&#039;];\t\n\t\t\t}\n\t\t},\n\t\terror: function(xhr, ajaxOptions, thrownError) {\n\t\t\talert(thrownError + &quot;\\r\\n&quot; + xhr.statusText + &quot;\\r\\n&quot; + xhr.responseText);\n\t\t}\n\t});\n});\n\/\/--&gt;&lt;\/script&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Front End For Buyers At The Checkout Page<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment.png\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment-1200x472.png\" alt=\"payment\" class=\"wp-image-377551\" width=\"903\" height=\"355\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment-1200x472.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment-300x118.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment-250x98.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment-768x302.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/payment.png 1203w\" sizes=\"(max-width: 903px) 100vw, 903px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1159\" height=\"592\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/checkout-payment.png\" alt=\"checkout-payment\" class=\"wp-image-377553\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/checkout-payment.png 1159w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/checkout-payment-300x153.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/checkout-payment-250x128.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/checkout-payment-768x392.png 768w\" sizes=\"(max-width: 1159px) 100vw, 1159px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>To do modification in the Opencart root files, you can <a href=\"https:\/\/webkul.com\/blog\/opencart-modification-system\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">create XML file<\/a> inside install.xml  and make its zip with the xyz_payment.ocmod.xml extension. We can found the above XML file within the&nbsp;ocmod&nbsp;folder of the Payment extension root directory.<\/p>\n\n\n\n<p>Thank You !<\/p>\n\n\n\n<p>If you need custom&nbsp;<a href=\"https:\/\/webkul.com\/opencart-development\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Opencart Development services<\/a>&nbsp;then feel free to&nbsp;<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>&nbsp;and also explore our exclusive range of&nbsp;<a href=\"https:\/\/store.webkul.com\/OpenCart-Modules.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Opencart Extensions<\/a>.<\/p>\n\n\n\n<p>!! Have a Great Day Ahead !!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog describes how a developer can create a new Payment extension in Opencart version 3.0.3.8. Nowadays Online payment systems play an vital role which is like a backbone in e-commerce. In simple terms, payment processing refers to&nbsp;accepting and handling customer payments. This process includes various steps, such as capturing payment information, authorization of the <a href=\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":525,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305],"tags":[],"class_list":["post-376480","post","type-post","status-publish","format-standard","hentry","category-opencart"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Webkul Blog how-to-create-opencart-payment-extension<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Webkul Blog how-to-create-opencart-payment-extension\" \/>\n<meta property=\"og:description\" content=\"This blog describes how a developer can create a new Payment extension in Opencart version 3.0.3.8. Nowadays Online payment systems play an vital role which is like a backbone in e-commerce. In simple terms, payment processing refers to&nbsp;accepting and handling customer payments. This process includes various steps, such as capturing payment information, authorization of the [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-17T05:20:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-24T06:19:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\" \/>\n<meta name=\"author\" content=\"Sandhya Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sandhya Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\"},\"author\":{\"name\":\"Sandhya Mishra\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/ea8e30ea11c5b2953191b79a4bcac159\"},\"headline\":\"How to create a payment extension in Opencart ?\",\"datePublished\":\"2023-04-17T05:20:14+00:00\",\"dateModified\":\"2023-04-24T06:19:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\"},\"wordCount\":574,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\",\"articleSection\":[\"opencart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\",\"name\":\"Webkul Blog how-to-create-opencart-payment-extension\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\",\"datePublished\":\"2023-04-17T05:20:14+00:00\",\"dateModified\":\"2023-04-24T06:19:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png\",\"width\":944,\"height\":570,\"caption\":\"directory\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create a payment extension in Opencart ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/ea8e30ea11c5b2953191b79a4bcac159\",\"name\":\"Sandhya Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70445b6b82958c3b345e220309c945da5f7cf1526b8d54cf8293d418a00bb370?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70445b6b82958c3b345e220309c945da5f7cf1526b8d54cf8293d418a00bb370?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Sandhya Mishra\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sandhya-oc722\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Webkul Blog how-to-create-opencart-payment-extension","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:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/","og_locale":"en_US","og_type":"article","og_title":"Webkul Blog how-to-create-opencart-payment-extension","og_description":"This blog describes how a developer can create a new Payment extension in Opencart version 3.0.3.8. Nowadays Online payment systems play an vital role which is like a backbone in e-commerce. In simple terms, payment processing refers to&nbsp;accepting and handling customer payments. This process includes various steps, such as capturing payment information, authorization of the [...]","og_url":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-04-17T05:20:14+00:00","article_modified_time":"2023-04-24T06:19:30+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png","type":"","width":"","height":""}],"author":"Sandhya Mishra","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sandhya Mishra","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/"},"author":{"name":"Sandhya Mishra","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/ea8e30ea11c5b2953191b79a4bcac159"},"headline":"How to create a payment extension in Opencart ?","datePublished":"2023-04-17T05:20:14+00:00","dateModified":"2023-04-24T06:19:30+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/"},"wordCount":574,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png","articleSection":["opencart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/","url":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/","name":"Webkul Blog how-to-create-opencart-payment-extension","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png","datePublished":"2023-04-17T05:20:14+00:00","dateModified":"2023-04-24T06:19:30+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/directory.png","width":944,"height":570,"caption":"directory"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-opencart-payment-extension\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create a payment extension in Opencart ?"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/ea8e30ea11c5b2953191b79a4bcac159","name":"Sandhya Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/70445b6b82958c3b345e220309c945da5f7cf1526b8d54cf8293d418a00bb370?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70445b6b82958c3b345e220309c945da5f7cf1526b8d54cf8293d418a00bb370?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Sandhya Mishra"},"url":"https:\/\/webkul.com\/blog\/author\/sandhya-oc722\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/376480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/525"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=376480"}],"version-history":[{"count":85,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/376480\/revisions"}],"predecessor-version":[{"id":377956,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/376480\/revisions\/377956"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=376480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=376480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=376480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}