Implement new PSP

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #34308

Hi!

As there is no plug-in for our favourite PSP ( www.mpay24.com ) we have to implement a way to use our PSP. Is there a tutorial or how-to how to do this? We only have to pass the price and the order number to our PSP. The payment itself will be done on the site of mpay

Best regards

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34324

Hi,

We have a developer documentation here for that: www.hikashop.com/en/support/documentatio...r-documentation.html
Also, you can take the other payment plugins as example for yours.

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #35143

Hi!

I just wanted to test the Paypal Plugin and after clicking on "Next" I receive the following error message:

Error loading module Table 'm' was not locked with LOCK TABLES SQL=SELECT m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id LEFT JOIN jos_extensions AS e ON e.element = m.module AND e.client_id = m.client_id WHERE m.published = 1 AND e.enabled = 1 AND (m.publish_up = '0000-00-00 00:00:00' OR m.publish_up <= '2012-01-11 08:06:24') AND (m.publish_down = '0000-00-00 00:00:00' OR m.publish_down >= '2012-01-11 08:06:24') AND m.access IN (1,1,2,3) AND m.client_id = 0 AND (mm.menuid = 119 OR mm.menuid <= 0) ORDER BY m.position, m.ordering

Best regards

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35208

That's an error in joomla not in HikaShop.
If you turn off the debug mode of the configuration of Joomla you won't have the problem anymore.

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #35568

The error only appears when the debug mode is off. When I switch on the debug mode, the complete site crashes when I click on "Next".

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35569

Then could you also turn on the error reporting option in the configuration of joomla and try again ?
Do you get an error when you click next then ?

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #35583

In addition these errors appear:

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /mnt/data/www/libraries/joomla/database/database/mysqli.php on line 305 Warning: Invalid argument supplied for foreach() in /mnt/data/www/administrator/components/com_hikashop/classes/field.php on line 445 Notice: Trying to get property of non-object in /mnt/data/www/components/com_hikashop/views/checkout/view.html.php on line 415 Notice: Trying to get property of non-object in /mnt/data/www/components/com_hikashop/views/checkout/view.html.php on line 415 Warning: Invalid argument supplied for foreach() in /mnt/data/www/administrator/components/com_hikashop/classes/field.php on line 445

Notice: Trying to get property of non-object in /mnt/data/www/components/com_hikashop/views/checkout/tmpl/payment.php on line 12 Notice: Trying to get property of non-object in /mnt/data/www/components/com_hikashop/views/checkout/tmpl/payment.php on line 12

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35603

Could you change your database handler from MySQLi to MySQL in the configuration of joomla and try again ?

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #35738

This didn't change anything

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #35753

The problem was the plugin which changed the order number and used a LOCK for the table.

I'm trying to implement the payment plugin with PayPal as an example but that's not very easy, as there are hardly any comments. For example I don't really see, where the forwarding in the "onAfterOrderConfirm" happens.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35823

The comments are removed automatically from the code to reduce the size of the packages.

The onAfterOrderConfirm happens at the end of the after_confirm function of the checkout controller. So the order was just created and the payment plugin is directly triggered. when the onAfterOrderConfirm function finishes, the system displays the content displayed by the plugin in the end step. In the PyaPal plugin, the paypal_end file content is displayed by the onAfterOrderConfirm function in that end step and that's what is redirecting to the paypal gateway.

Please Log in or Create an account to join the conversation.

  • Posts: 137
  • Thank you received: 2
12 years 10 months ago #36512

Then it would be very helpful to offer a version with in-code comments!

I don't see where the redirect to PayPal is in the onAfterOrderConfirm. I only see a redirect in the onPaymentNotification, that's what I don't understand.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36575

As I said, the PayPal onAfterOrderConfirm function uses the paypal_end.php file to display the form of the end step. Thus the redirect you're looking for is in that paypal_end.php file.
You'll see, there is an auto submit of the form with one line of javascript.

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum