Created
March 25, 2021 06:57
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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