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

#   How to insert/update data in custom created table in hikashop payment plugin

##

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

Less More

- Posts: 21
- Thank you received: 0
-
-

6 years 4 months ago [\#321634](#321634) by [ajdev33](/forum/user/59738-ajdev33 "View ajdev33's Profile")  *[How to insert/update data in custom created table in hikashop payment plugin](/forum/31-development/900338-how-to-insert-update-data-in-custom-created-table-in-hikashop-payment-plugin#321634 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3  Hello,  I am working on custom third party payment plugin. I have created a new table &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot; using install script in my plugin. Now I want to save data into this table in onPaymentNotification function.  I saw that we can save data in order table like below :  $orderClass = hikashop&#95;get('class.order'); $order = new stdClass(); $order-&gt;order&#95;id = $order&#95;id; $order-&gt;custom&#95;auth&#95;number = $authNumber; $order-&gt;custom&#95;txn&#95;id = $transactionId; $orderClass-&gt;save($order);  But I don't know I how to save in my newly created table which is &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot;.  So if anyone has knowledge about this then please let me know.  Thanks in advance!")* was created by *[ajdev33](/forum/user/59738-ajdev33 "View ajdev33's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3

Hello,

I am working on custom third party payment plugin. I have created a new table "mmf9b_customer_saved_cards" using install script in my plugin. Now I want to save data into this table in onPaymentNotification function.

I saw that we can save data in order table like below :

$orderClass = hikashop_get('class.order');
$order = new stdClass();
$order-&gt;order_id = $order_id;
$order-&gt;custom_auth_number = $authNumber;
$order-&gt;custom_txn_id = $transactionId;
$orderClass-&gt;save($order);

But I don't know I how to save in my newly created table which is "mmf9b_customer_saved_cards".

So if anyone has knowledge about this then please let me know.

Thanks in advance!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwMDMzOC1ob3ctdG8taW5zZXJ0LXVwZGF0ZS1kYXRhLWluLWN1c3RvbS1jcmVhdGVkLXRhYmxlLWluLWhpa2FzaG9wLXBheW1lbnQtcGx1Z2luP3RtcGw9bWFya2Rvd24=) 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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

6 years 4 months ago [\#321640](#321640) 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 insert/update data in custom created table in hikashop payment plugin](/forum/31-development/900338-how-to-insert-update-data-in-custom-created-table-in-hikashop-payment-plugin#321640 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3  Hello,  I am working on custom third party payment plugin. I have created a new table &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot; using install script in my plugin. Now I want to save data into this table in onPaymentNotification function.  I saw that we can save data in order table like below :  $orderClass = hikashop&#95;get('class.order'); $order = new stdClass(); $order-&gt;order&#95;id = $order&#95;id; $order-&gt;custom&#95;auth&#95;number = $authNumber; $order-&gt;custom&#95;txn&#95;id = $transactionId; $orderClass-&gt;save($order);  But I don't know I how to save in my newly created table which is &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot;.  So if anyone has knowledge about this then please let me know.  Thanks in advance!")*

Hello,

HikaShop do provides classes for its own structures and tables.
But if you do add your own database tables, you need to create your own classes or to perform directly the SQL queries.
[ docs.joomla.org/Inserting,\_Updating\_and\_...data\_using\_JDatabase](https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase)

Regards,

---

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

The following user(s) said Thank You: [ajdev33](/forum/user/59738-ajdev33 "View ajdev33's Profile")

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

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

Less More

- Posts: 21
- Thank you received: 0
-
-

6 years 4 months ago [\#321647](#321647) by [ajdev33](/forum/user/59738-ajdev33 "View ajdev33's Profile")  Replied by *[ajdev33](/forum/user/59738-ajdev33 "View ajdev33's Profile")* on topic *[How to insert/update data in custom created table in hikashop payment plugin](/forum/31-development/900338-how-to-insert-update-data-in-custom-created-table-in-hikashop-payment-plugin#321647 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.3  Hello,  I am working on custom third party payment plugin. I have created a new table &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot; using install script in my plugin. Now I want to save data into this table in onPaymentNotification function.  I saw that we can save data in order table like below :  $orderClass = hikashop&#95;get('class.order'); $order = new stdClass(); $order-&gt;order&#95;id = $order&#95;id; $order-&gt;custom&#95;auth&#95;number = $authNumber; $order-&gt;custom&#95;txn&#95;id = $transactionId; $orderClass-&gt;save($order);  But I don't know I how to save in my newly created table which is &quot;mmf9b&#95;customer&#95;saved&#95;cards&quot;.  So if anyone has knowledge about this then please let me know.  Thanks in advance!")*

Thanks for very helpful information.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwMDMzOC1ob3ctdG8taW5zZXJ0LXVwZGF0ZS1kYXRhLWluLWN1c3RvbS1jcmVhdGVkLXRhYmxlLWluLWhpa2FzaG9wLXBheW1lbnQtcGx1Z2luP3RtcGw9bWFya2Rvd24=) 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.087 seconds

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