Paybox integration using node.js – with example HTML

This post will help you get Paybox integration to work using node.js.

You can find a full working example in the src/paybox-integration dir of my blog code repository.

Paybox is a French payment provider. Getting their integration to work can be quite a hassle.

The simplest way to get payments to work, is to generate a form and post it to the paybox servers. This form must contain an HMAC signature based on your private HMAC key and the form data. It is rather tricky to get this right.

Unfortunately, if you do anything wrong with your form, you get a generic – and totally unhelpful – error message.

This does not help you debug your code.

This does not help you debug your code.

Fortunately, there is a permanent test user on the paybox test environment. This can help you get it up and running. The test user has this HMAC key:

Here is a form that just works with the test user:

Using the data in this form, you can figure out whether your HMAC algorithm is working correctly. We used the node-paybox module, which looks not that well maintained, but it works well.

This is how we use it:

Hopefully this will help you in getting Paybox integration to work. For a working example, see the src/paybox-integration dir of my blog code repository.

This entry was posted in JavaScript, node.js, software development. Bookmark the permalink.

Leave a Reply

Your email address will not be published.