Skip to content

Instantly share code, notes, and snippets.

@krokedilgists
Created March 25, 2021 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krokedilgists/b0960c6be1fb07287b959c5b35c78c89 to your computer and use it in GitHub Desktop.
Save krokedilgists/b0960c6be1fb07287b959c5b35c78c89 to your computer and use it in GitHub Desktop.
Modify the create payment session request body before it is sent to Briqpay.
<?php
/**
* Use together with Briqpay for WooCommerce pluign.
* https://krokedil.se/produkt/briqpay-for-woocommerce/
*
* Modify the create payment session request body. In this case we set credit scoring and max amount values to true.
* Read more about Briqpay create session here: https://developer.briqpay.com/#operation/CreateSession.
* Add this code to your themes functions.php file or include it in a separate functionality plugin (https://css-tricks.com/wordpress-functionality-plugins/).
**/
add_filter('briqpay_create_args', 'custom_briqpay_create_args' );
function custom_briqpay_create_args( $request_args ) {
$request_args['merchantconfig']['maxamount'] = true;
$request_args['merchantconfig']['creditscoring'] = true;
return $request_args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment