PHP code example of wp-pay-gateways / adyen

1. Go to this page and download the library: Download wp-pay-gateways/adyen library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wp-pay-gateways / adyen example snippets


add_action( 'pronamic_pay_adyen_checkout_head', 'custom_adyen_checkout_head', 15 );

function custom_adyen_checkout_head() {
	wp_register_style(
		'custom-adyen-checkout-style',
		get_stylesheet_directory_uri() . '/css/adyen-checkout.css',
		array(),
		'1.0.0'
	);

	wp_print_styles( 'custom-adyen-checkout-style' );
}

add_filter( 'pronamic_pay_adyen_config_object', 'custom_adyen_config_object', 15 );

function custom_adyen_config_object( $config_object ) {
	$style_object = (object) array(
		'base'        => (object) array(
			'color'         => '#000',
			'fontSize'      => '14px',
			'lineHeight'    => '14px',
			'fontSmoothing' => 'antialiased',
		),
		'error'       => (object) array(
			'color' => 'red',
		),
		'placeholder' => (object) array(
			'color' => '#d8d8d8',
		),
		'validated'   => (object) array(
			'color' => 'green',
		),
	);

	$config_object->paymentMethods = (object) array(
		'card' => (object) array(
			'sfStyles' => $style_object,
		),
	);

	return $config_object;
}