add_filter( 'gform_shortcode_paystack', 'custom_paystack_shortcode', 10, 3 );
function custom_paystack_shortcode( $shortcode, $atts, $form ) {
// Get the payment amount field value from the form
$payment_amount = rgar( $form, 'input_5' ); // Replace '1' with the actual field ID of the payment amount field
// Modify the Paystack shortcode with the updated payment amount
$shortcode = str_replace( 'amount="0"', 'amount="' . $payment_amount . '"', $shortcode );
return $shortcode;
}