DIBS module “No paytype(s)! Missing test parameter?” error – Fixed!

DIBS Payment module test parameter causes “No paytype(s)! Missing test parameter?” error. We found the problem and solution how to fix it.

We got this error:

No paytype(s)! Missing test parameter?
No paytype(s)! Missing test parameter?

This is how I fixed it:

Open file modules/dibs/dibs.php.

Find line:

$dibsParams['test'] = (self::$TESTING === 1) ? 'yes' : 'no';

Replace it with this line:

if(self::$TESTING === 1)
    $dibsParams['test'] = 1;

It fixed the problem. Actually it is documented in DIBS documentation:

1. DIBS test parameter documentation

DIBS declared in their documentation that if you use standard payment window you should include test parameter in your form only if you are testing your system and the value should be only 1 – integer value. Read more here http://tech.dibs.dk/parameters/

If you use DIBS API the test parameter values should be yes or no. Read more here http://tech.dibs.dk/dibs_api/payment_functions/authcgi/

I tried to assign value 0 and it worked – strange. I think DIBS accepts 0 also but it does not accept 1 if your testing is not enabled by DIBS – read on.

2. DIBS testing

As I mentioned I tried to assign parameter test with value 1 but got the same problem. I could not make any tests. When it is assigned with value 0 – it worked. And this is why:

DIBS declared how testing should be performed. You should contact DIBS and ask them to enable testing environment. This is what DIBS documentation states:

“Your shop should have activated the test mode with DIBS. New shops always start with the test mode activated, but the test mode is deactivated as soon as the shop goes “live””

Read more here: http://tech.dibs.dk/10_step_guide/your_own_test/

3. Other noticed problems with DIBS

I also googled some incompatibilities with DIBS and other PreStashop modules. It seems that one page checkout and Mail alert module can also cause some problems. So teast DIBS before you go no production with this module. Read more about incompatibilities in this PrestaShop forum post.

4. Questions and Answers from DIBS support

1. If we want to integrate DIBS module in our webpage we should use this documentation page:  http://tech.dibs.dk/standard_payment_window_introduction/ – yes? If we use this method then test parameter can have only one value 1 (integer)?

Answer: yes.

2. If we use DIBS API then we should follow this documentation: http://tech.dibs.dk/dibs_api/payment_functions/authcgi/ – yes? And test parameter can have values “yes” or “no”?

Answer: yes.

3. If we want to test DIBS module we should ask DIBS to enable test environment like it is documented here: http://tech.dibs.dk/10_step_guide/your_own_test/ – yes?

Answer: yes.

5. Conclusion

OK I think the problem is solved. Assumptions were correct.  I have reported this problem to PrestaShop: http://forge.prestashop.com/browse/PSCFI-2191

If you have some questions I will reply them ASAP. Write me an email donatas@invertus.lt or just leave a comment on our blog!

Thank you!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>