[Skip to main content](#vessel-content)

#   How to copy a payment plugin?

##

- **[rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")**
- [![rodrigo8&#95;4's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile") Topic Author
- [ Offline](/forum/user/14314-rodrigo8-4)

Less More

- Posts: 7
- Thank you received: 0
-
-

13 years 2 weeks ago [\#128668](#128668) by [rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")  *[How to copy a payment plugin?](/forum/4-how-to/862949-how-to-copy-a-payment-plugin#128668 "So, I need 3 additional copies of the western union or bank transfer plugin.  I don´t have much programming knowledge but I tried to edit the plugin many times changing the name, type, class, doing different versions of the plugin, and then trying to install them through the joomla extension path.  Well I give up, there is always some code conflict that appears after instalation, sometimes in the backend, other times on the frontend.  For example, I attached one version of the western union payment plugin edition:  I get an error on the back end:  Fatal error: Call to a member function display() on a non-object in /plugins/hikashoppayment/western2/western2&#95;configuration.php on line 17  Which is:   data-&gt;display(&quot;data&#91;payment&#93;&#91;payment&#95;params&#93;&#91;order&#95;status&#93;&quot;,@$this-&gt;element-&gt;payment&#95;params-&gt;order&#95;status); ?&gt;   If I delete that line I can access the backend, but then I get an error on the frontend  Fatal error: Cannot redeclare class plgHikashoppaymentWesternunion in /plugins/hikashoppayment/western2/western2.php on line 118  Which is the last line of:  $information = $method-&gt;payment&#95;params-&gt;information; if(preg&#95;match('#^&#91;a-z0-9&#95;&#93;&#42;$#i',$information)){ $information = JText::&#95;($information); } $currencyClass = hikashop&#95;get('class.currency'); $amount = $currencyClass-&gt;format($order-&gt;order&#95;full&#95;price,$order-&gt;order&#95;currency&#95;id); $order&#95;number = $order-&gt;order&#95;number; require($path);  return true; } }  Can someone give me some step by step process to have the westernunion or banktransfer plugin copied 3 more times?  Thank you")* was created by *[rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")*

So, I need 3 additional copies of the western union or bank transfer plugin.

I don´t have much programming knowledge but I tried to edit the plugin many times changing the name, type, class, doing different versions of the plugin, and then trying to install them through the joomla extension path.

Well I give up, there is always some code conflict that appears after instalation, sometimes in the backend, other times on the frontend.

For example, I attached one version of the western union payment plugin edition:

I get an error on the back end:

Fatal error: Call to a member function display() on a non-object in /plugins/hikashoppayment/western2/western2_configuration.php on line 17

Which is:

&lt;td&gt;
&lt;?php echo $this-&gt;data-&gt;display("data[payment][payment_params][order_status]",@$this-&gt;element-&gt;payment_params-&gt;order_status); ?&gt;
&lt;/td&gt;

If I delete that line I can access the backend, but then I get an error on the frontend

Fatal error: Cannot redeclare class plgHikashoppaymentWesternunion in /plugins/hikashoppayment/western2/western2.php on line 118

Which is the last line of:

$information = $method-&gt;payment_params-&gt;information;
if(preg_match('#^[a-z0-9_]*$#i',$information)){
$information = JText::_($information);
}
$currencyClass = hikashop_get('class.currency');
$amount = $currencyClass-&gt;format($order-&gt;order_full_price,$order-&gt;order_currency_id);
$order_number = $order-&gt;order_number;
require($path);

return true;
}
}

Can someone give me some step by step process to have the westernunion or banktransfer plugin copied 3 more times?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2Mjk0OS1ob3ctdG8tY29weS1hLXBheW1lbnQtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 2 weeks ago [\#128669](#128669) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to copy a payment plugin?](/forum/4-how-to/862949-how-to-copy-a-payment-plugin#128669 "So, I need 3 additional copies of the western union or bank transfer plugin.  I don´t have much programming knowledge but I tried to edit the plugin many times changing the name, type, class, doing different versions of the plugin, and then trying to install them through the joomla extension path.  Well I give up, there is always some code conflict that appears after instalation, sometimes in the backend, other times on the frontend.  For example, I attached one version of the western union payment plugin edition:  I get an error on the back end:  Fatal error: Call to a member function display() on a non-object in /plugins/hikashoppayment/western2/western2&#95;configuration.php on line 17  Which is:   data-&gt;display(&quot;data&#91;payment&#93;&#91;payment&#95;params&#93;&#91;order&#95;status&#93;&quot;,@$this-&gt;element-&gt;payment&#95;params-&gt;order&#95;status); ?&gt;   If I delete that line I can access the backend, but then I get an error on the frontend  Fatal error: Cannot redeclare class plgHikashoppaymentWesternunion in /plugins/hikashoppayment/western2/western2.php on line 118  Which is the last line of:  $information = $method-&gt;payment&#95;params-&gt;information; if(preg&#95;match('#^&#91;a-z0-9&#95;&#93;&#42;$#i',$information)){ $information = JText::&#95;($information); } $currencyClass = hikashop&#95;get('class.currency'); $amount = $currencyClass-&gt;format($order-&gt;order&#95;full&#95;price,$order-&gt;order&#95;currency&#95;id); $order&#95;number = $order-&gt;order&#95;number; require($path);  return true; } }  Can someone give me some step by step process to have the westernunion or banktransfer plugin copied 3 more times?  Thank you")*

Hi,

With HikaShop 2.2.x, you do not need to copy a payment plugin (by copying files). You can already create several configurations for a single payment plugin.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2Mjk0OS1ob3ctdG8tY29weS1hLXBheW1lbnQtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")**
- [![rodrigo8&#95;4's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile") Topic Author
- [ Offline](/forum/user/14314-rodrigo8-4)

Less More

- Posts: 7
- Thank you received: 0
-
-

13 years 2 weeks ago [\#128673](#128673) by [rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")  Replied by *[rodrigo8\_4](/forum/user/14314-rodrigo8-4 "View rodrigo8&#95;4's Profile")* on topic *[How to copy a payment plugin?](/forum/4-how-to/862949-how-to-copy-a-payment-plugin#128673 "So, I need 3 additional copies of the western union or bank transfer plugin.  I don´t have much programming knowledge but I tried to edit the plugin many times changing the name, type, class, doing different versions of the plugin, and then trying to install them through the joomla extension path.  Well I give up, there is always some code conflict that appears after instalation, sometimes in the backend, other times on the frontend.  For example, I attached one version of the western union payment plugin edition:  I get an error on the back end:  Fatal error: Call to a member function display() on a non-object in /plugins/hikashoppayment/western2/western2&#95;configuration.php on line 17  Which is:   data-&gt;display(&quot;data&#91;payment&#93;&#91;payment&#95;params&#93;&#91;order&#95;status&#93;&quot;,@$this-&gt;element-&gt;payment&#95;params-&gt;order&#95;status); ?&gt;   If I delete that line I can access the backend, but then I get an error on the frontend  Fatal error: Cannot redeclare class plgHikashoppaymentWesternunion in /plugins/hikashoppayment/western2/western2.php on line 118  Which is the last line of:  $information = $method-&gt;payment&#95;params-&gt;information; if(preg&#95;match('#^&#91;a-z0-9&#95;&#93;&#42;$#i',$information)){ $information = JText::&#95;($information); } $currencyClass = hikashop&#95;get('class.currency'); $amount = $currencyClass-&gt;format($order-&gt;order&#95;full&#95;price,$order-&gt;order&#95;currency&#95;id); $order&#95;number = $order-&gt;order&#95;number; require($path);  return true; } }  Can someone give me some step by step process to have the westernunion or banktransfer plugin copied 3 more times?  Thank you")*

you guys are really awesome!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2Mjk0OS1ob3ctdG8tY29weS1hLXBheW1lbnQtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.069 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
