<?php
return array(
	'enabled'           => array(
		'title'       => __( 'Enabled', 'wc-stripe-payments' ),
		'type'        => 'checkbox',
		'default'     => 'yes',
		'value'       => 'yes',
		'desc_tip'    => true,
		'description' => __( 'If enabled, your site can accept credit card payments through Stripe.', 'wc-stripe-payments' ),
	),
	'desc1'             => array(
		'type'        => 'description',
		'description' => sprintf( __( '%1$sCards for Test Payment%2$s', 'wc-stripe-payments' ), '<a target="_blank" href="https://stripe.com/docs/testing#cards">', '</a>' ),
	),
	'general_settings'  => array(
		'type'  => 'title',
		'title' => __( 'General Settings', 'wc-stripe-payments' ),
	),
	'title_text'        => array(
		'type'        => 'text',
		'title'       => __( 'Title', 'wc-stripe-payments' ),
		'default'     => __( 'Credit Cards', 'wc-stripe-payments' ),
		'desc_tip'    => true,
		'description' => __( 'Title of the credit card gateway' ),
	),
	'description'       => array(
		'title'       => __( 'Description', 'wc-stripe-payments' ),
		'type'        => 'text',
		'default'     => '',
		'description' => __( 'Leave blank if you don\'t want a description to show for the gateway.', 'wc-stripe-payments' ),
		'desc_tip'    => true,
	),
	'method_format'     => array(
		'title'       => __( 'Credit Card Display', 'wc-stripe-payments' ),
		'type'        => 'select',
		'class'       => 'wc-enhanced-select',
		'options'     => wp_list_pluck( $this->get_method_formats(), 'example' ),
		'value'       => '',
		'default'     => 'type_ending_in',
		'desc_tip'    => true,
		'description' => __( 'This option allows you to customize how the credit card will display for your customers on orders, subscriptions, etc.' ),
	),
	'charge_type'       => array(
		'type'        => 'select',
		'title'       => __( 'Charge Type', 'wc-stripe-payments' ),
		'default'     => 'capture',
		'class'       => 'wc-enhanced-select',
		'options'     => array(
			'capture'   => __( 'Capture', 'wc-stripe-payments' ),
			'authorize' => __( 'Authorize', 'wc-stripe-payments' ),
		),
		'desc_tip'    => true,
		'description' => __( 'This option determines whether the customer\'s funds are captured immediately or authorized and can be captured at a later date.', 'wc-stripe-payments' ),
	),
	'order_status'      => array(
		'type'        => 'select',
		'title'       => __( 'Order Status', 'wc-stripe-payments' ),
		'default'     => 'default',
		'class'       => 'wc-enhanced-select',
		'options'     => array_merge( array( 'default' => __( 'Default', 'wc-stripe-payments' ) ), wc_get_order_statuses() ),
		'tool_tip'    => true,
		'description' => __( 'This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status.', 'wc-stripe-payments' ),
	),
	'save_card_enabled' => array(
		'type'        => 'checkbox',
		'value'       => 'yes',
		'default'     => 'yes',
		'title'       => __( 'Allow Credit Card Save', 'wc-stripe-payments' ),
		'desc_tip'    => false,
		'description' => __( 'If enabled, a checkbox will be available on the checkout page allowing your customers to save their credit card. The payment methods are stored securely in Stripe\'s vault and never touch your server. Note: if the cart contains a subscription, there will be no checkbox because the payment method will be saved automatically.', 'wc-stripe-payments' ),
	),
	'force_3d_secure'   => array(
		'title'       => __( 'Force 3D Secure', 'wc-stripe-payments' ),
		'type'        => 'checkbox',
		'value'       => 'yes',
		'default'     => 'no',
		'desc_tip'    => false,
		'description' => sprintf( __( 'Stripe internally determines when 3D secure should be presented based on their SCA engine. If <strong>Force 3D Secure</strong> is enabled, 3D Secure will be forced for ALL credit card transactions. In test mode 3D secure only shows for %1$s3DS Test Cards%2$s regardless of this setting.', 'wc-stripe-payments' ), '<a target="_blank" href="https://stripe.com/docs/testing#regulatory-cards">', '</a>' ),
	),
	'generic_error'     => array(
		'title'       => __( 'Generic Errors', 'wc-stripe-payments' ),
		'type'        => 'checkbox',
		'default'     => 'no',
		'value'       => 'yes',
		'desc_tip'    => true,
		'description' => __( 'If enabled, credit card errors will be generic when presented to the customer. Merchants may prefer to not provide details on why a card was not accepted for security purposes.', 'wc-stripe-payments' ),
	),
	'cards'             => array(
		'type'        => 'multiselect',
		'title'       => __( 'Accepted Payment Methods', 'wc-stripe-payments' ),
		'class'       => 'wc-enhanced-select stripe-accepted-cards',
		'default'     => array( 'amex', 'discover', 'visa', 'mastercard' ),
		'options'     => array(
			'visa'            => __( 'Visa', 'wc-stripe-payments' ),
			'amex'            => __( 'Amex', 'wc-stripe-payments' ),
			'discover'        => __( 'Discover', 'wc-stripe-payments' ),
			'mastercard'      => __( 'MasterCard', 'wc-stripe-payments' ),
			'jcb'             => __( 'JCB', 'wc-stripe-payments' ),
			'maestro'         => __( 'Maestro', 'wc-stripe-payments' ),
			'diners'          => __( 'Diners Club', 'wc-stripe-payments' ),
			'china_union_pay' => __( 'Union Pay', 'wc-stripe-payments' ),
		),
		'desc_tip'    => true,
		'description' => __( 'The selected icons will show customers which credit card brands you accept.', 'wc-stripe-payments' ),
	),
	'form_title'        => array(
		'type'  => 'title',
		'title' => __( 'Credit Card Form', 'wc-stripe-payments' ),
	),
	'form_type'         => array(
		'title'       => __( 'Card Form', 'wc-stripe-payments' ),
		'type'        => 'select',
		'options'     => array(
			'inline' => __( 'Stripe form', 'wc-stripe-payments' ),
			'custom' => __( 'Custom form', 'wc-stripe-payments' ),
		),
		'default'     => 'inline',
		'description' => __( 'The Stripe form option displays a CC form rendered by Stripe. It works well with most themes. The custom card forms are offered if you want more options on the CC form design.', 'wc-stripe-payments' ),
	),
	'custom_form'       => array(
		'title'             => __( 'Custom Form', 'wc-stripe-payments' ),
		'type'              => 'select',
		'options'           => wp_list_pluck( wpp_payment_get_custom_forms(), 'label' ),
		'default'           => 'bootstrap',
		'description'       => __( 'The design of the credit card form.', 'wc-stripe-payments' ),
		'desc_tip'          => true,
		'custom_attributes' => array( 'data-show-if' => array( 'form_type' => 'custom' ) ),
	),
	'postal_enabled'    => array(
		'title'             => __( 'Postal Code', 'wc-stripe-payments' ),
		'type'              => 'checkbox',
		'default'           => 'no',
		'description'       => __( 'If enabled, the CC form will show the postal code on the checkout page. If disabled, the billing field\'s postal code will be used. The postal code will show on the Add Payment Method page for security reasons.', 'wc-stripe-payments' ),
		'desc_tip'          => true,
		'custom_attributes' => array( 'data-show-if' => array( 'form_type' => 'custom' ) ),
	)
);
