Fork me on GitHub

Plugin paybox

Introduction

Two use case exists :

  1. User redirection form Lutece website to Paybox system.
  2. Paybox callback

Both are explained following

Better reading a follong documentations before going forward : ManuelIntegrationPayboxSystem_V5.08_EN.pdf et ParametresTestPaybox_V5.08_EN.pdf in version 5.8 downloadable on Paybox documentation page .

User redirection form Lutece website to Paybox system.

In most case only 3 parameters are requires :

  • An amount
  • A folder reference.
  • A user mail.
// Amount of 100 € form  33, le mail de l’usager est usager@isp.tld
String monUrl = PayboxUtil.buildPayboxUrl( 10000L, "33", "usager@isp.tld" );

For more complexe cases you should use

public static String buildPayboxUrl( final String url, final LinkedHashMap<String, String> params )
method of PayboxUtil.java and pass a hash map of key/values in parameter, except PBX_TIME , PBX_HASH and PBX_HMAC which are managed by method internals.

Paybox callback

Once payment is finished by user, Paybox send an HTTP request to a configurable url.
checkSignature method check send signature. You just have to pass query string in parameter.
True is retuned if signature is checked.

// HttpServletRequest request
PayboxUtil.checkSignature( request.getQueryString( ) )