gform_stripe_webhook_signing_secret

gform_stripe_webhook_signing_secret

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
The 「gform_stripe_webhook_signing_secret」 filter in the Gravity Forms Stripe Add-On allows the webhook signing secret for the specified API mode to be modified.
Usage
add_filter( 'gform_stripe_webhook_signing_secret', 'your_function_name', 10, 3 );

Parameters

$signing_secret string
The signing secret to be used when validating received webhooks.

$mode string
The API mode; live or test.

$gfstripe object
GFStripe class object.

Examples
add_filter( 'gform_stripe_webhook_signing_secret', 'change_secret', 10, 3 );
function change_secret( $signing_secret, $mode, $gfstripe ){
if ( $mode == 'test' ){
return '1234567890';
}
else {
return '222222222';
}
}

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Stripe v2.3.1.
Source Code
This filter is located in GFStripe::get_webhook_signing_secret() in gravityformsstripe/class-gf-stripe.php.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註