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

#   Undefined property: plgHikashoppaymentExample::$ur

##

- **[oby](/forum/user/43072-oby "View oby's Profile")**
- [![oby's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43072-oby "View oby's Profile") Topic Author
- [ Offline](/forum/user/43072-oby)

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 3 months ago [\#245142](#245142) by [oby](/forum/user/43072-oby "View oby's Profile")  *[Undefined property: plgHikashoppaymentExample::$ur](/forum/29-payment-methods/885498-undefined-property-plghikashoppaymentexample-ur#245142 "I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:  $return&#95;url = HIKASHOP&#95;LIVE.'index.php?option=com&#95;hikashop&amp;ctrl=checkout&amp;task=after&#95;end&amp;order&#95;id='.$order&#95;id.$this-&gt;url&#95;itemid;  $this-&gt;app-&gt;redirect($return&#95;url);  Then i get this message:  Notice: Undefined property: plgHikashoppaymentExample::$url&#95;itemid in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 275  Notice: Undefined property: plgHikashoppaymentExample::$app in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  Fatal error: Call to a member function redirect() on null in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  How can I clear the error so that I can proceed with the development. Thanks")* was created by *[oby](/forum/user/43072-oby "View oby's Profile")*

I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:

$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;order_id='.$order_id.$this-&gt;url_itemid;

$this-&gt;app-&gt;redirect($return_url);

Then i get this message:

Notice: Undefined property: plgHikashoppaymentExample::$url_itemid in C:\Bitnami\wampstack-5.6.22-0\apache2\htdocs\Joomla_3.5.1\plugins\hikashoppayment\example\example.php on line 275

Notice: Undefined property: plgHikashoppaymentExample::$app in C:\Bitnami\wampstack-5.6.22-0\apache2\htdocs\Joomla_3.5.1\plugins\hikashoppayment\example\example.php on line 282

Fatal error: Call to a member function redirect() on null in C:\Bitnami\wampstack-5.6.22-0\apache2\htdocs\Joomla_3.5.1\plugins\hikashoppayment\example\example.php on line 282

How can I clear the error so that I can proceed with the development. Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODU0OTgtdW5kZWZpbmVkLXByb3BlcnR5LXBsZ2hpa2FzaG9wcGF5bWVudGV4YW1wbGUtdXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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)
-

10 years 3 months ago [\#245143](#245143) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Undefined property: plgHikashoppaymentExample::$ur](/forum/29-payment-methods/885498-undefined-property-plghikashoppaymentexample-ur#245143 "I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:  $return&#95;url = HIKASHOP&#95;LIVE.'index.php?option=com&#95;hikashop&amp;ctrl=checkout&amp;task=after&#95;end&amp;order&#95;id='.$order&#95;id.$this-&gt;url&#95;itemid;  $this-&gt;app-&gt;redirect($return&#95;url);  Then i get this message:  Notice: Undefined property: plgHikashoppaymentExample::$url&#95;itemid in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 275  Notice: Undefined property: plgHikashoppaymentExample::$app in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  Fatal error: Call to a member function redirect() on null in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  How can I clear the error so that I can proceed with the development. Thanks")*

Hi,

If you're not calling the parent functions in order to initialize the variables ; you won't have access to elements likes "$this-&gt;payment_params" or "$this-&gt;app".
Unfortunately, without knowing the code you wrote ; we are not able to gave you more hint on it.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODU0OTgtdW5kZWZpbmVkLXByb3BlcnR5LXBsZ2hpa2FzaG9wcGF5bWVudGV4YW1wbGUtdXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[oby](/forum/user/43072-oby "View oby's Profile")**
- [![oby's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43072-oby "View oby's Profile") Topic Author
- [ Offline](/forum/user/43072-oby)

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 3 months ago [\#245191](#245191) by [oby](/forum/user/43072-oby "View oby's Profile")  Replied by *[oby](/forum/user/43072-oby "View oby's Profile")* on topic *[Undefined property: plgHikashoppaymentExample::$ur](/forum/29-payment-methods/885498-undefined-property-plghikashoppaymentexample-ur#245191 "I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:  $return&#95;url = HIKASHOP&#95;LIVE.'index.php?option=com&#95;hikashop&amp;ctrl=checkout&amp;task=after&#95;end&amp;order&#95;id='.$order&#95;id.$this-&gt;url&#95;itemid;  $this-&gt;app-&gt;redirect($return&#95;url);  Then i get this message:  Notice: Undefined property: plgHikashoppaymentExample::$url&#95;itemid in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 275  Notice: Undefined property: plgHikashoppaymentExample::$app in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  Fatal error: Call to a member function redirect() on null in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  How can I clear the error so that I can proceed with the development. Thanks")*

Hello,
Thank you for the quick response. Attached is the file containing the code.

Thank you.

*This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODU0OTgtdW5kZWZpbmVkLXByb3BlcnR5LXBsZ2hpa2FzaG9wcGF5bWVudGV4YW1wbGUtdXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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)
-

10 years 3 months ago [\#245213](#245213) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Undefined property: plgHikashoppaymentExample::$ur](/forum/29-payment-methods/885498-undefined-property-plghikashoppaymentexample-ur#245213 "I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:  $return&#95;url = HIKASHOP&#95;LIVE.'index.php?option=com&#95;hikashop&amp;ctrl=checkout&amp;task=after&#95;end&amp;order&#95;id='.$order&#95;id.$this-&gt;url&#95;itemid;  $this-&gt;app-&gt;redirect($return&#95;url);  Then i get this message:  Notice: Undefined property: plgHikashoppaymentExample::$url&#95;itemid in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 275  Notice: Undefined property: plgHikashoppaymentExample::$app in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  Fatal error: Call to a member function redirect() on null in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  How can I clear the error so that I can proceed with the development. Thanks")*

Hi,

Please see how the sample plugin is loading the order and how the payment params are loaded from the order object.
[ github.com/HikaShop/sample-payment-plugi...ter/example.php#L166](https://github.com/HikaShop/sample-payment-plugin/blob/master/example.php#L166)
You need the 6 lines to do the same and initialize correctly all the variables of the plugins (his params, the $this-&gt;app, etc).

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODU0OTgtdW5kZWZpbmVkLXByb3BlcnR5LXBsZ2hpa2FzaG9wcGF5bWVudGV4YW1wbGUtdXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[oby](/forum/user/43072-oby "View oby's Profile")**
- [![oby's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43072-oby "View oby's Profile") Topic Author
- [ Offline](/forum/user/43072-oby)

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 3 months ago [\#245233](#245233) by [oby](/forum/user/43072-oby "View oby's Profile")  Replied by *[oby](/forum/user/43072-oby "View oby's Profile")* on topic *[Undefined property: plgHikashoppaymentExample::$ur](/forum/29-payment-methods/885498-undefined-property-plghikashoppaymentexample-ur#245233 "I am developing a payment method using the Example.zip files as guide. Everything works well until I uncommented the following two line:  $return&#95;url = HIKASHOP&#95;LIVE.'index.php?option=com&#95;hikashop&amp;ctrl=checkout&amp;task=after&#95;end&amp;order&#95;id='.$order&#95;id.$this-&gt;url&#95;itemid;  $this-&gt;app-&gt;redirect($return&#95;url);  Then i get this message:  Notice: Undefined property: plgHikashoppaymentExample::$url&#95;itemid in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 275  Notice: Undefined property: plgHikashoppaymentExample::$app in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  Fatal error: Call to a member function redirect() on null in C:&#92;Bitnami&#92;wampstack-5.6.22-0&#92;apache2&#92;htdocs&#92;Joomla&#95;3.5.1&#92;plugins&#92;hikashoppayment&#92;example&#92;example.php on line 282  How can I clear the error so that I can proceed with the development. Thanks")*

Thanks a million! Including those lines solved the problem.
Have a nice day.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODU0OTgtdW5kZWZpbmVkLXByb3BlcnR5LXBsZ2hpa2FzaG9wcGF5bWVudGV4YW1wbGUtdXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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.205 seconds

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

[](#top)
