id(); } wp_enqueue_script( 'wp-pointer' ); wp_enqueue_style( 'wp-pointer' ); wp_enqueue_style( 'select2' ); wp_enqueue_script( 'select2' ); wp_enqueue_style( CF72CH_PREFIX . '_admin_css' ); $use_2checkout = intval( get_post_meta( $post_id, CF72CH_META_PREFIX . 'use_2checkout', true ) ); $debug_2checkout = intval( get_post_meta( $post_id, CF72CH_META_PREFIX . 'debug', true ) ); $payment_mode_val = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'payment_mode', true ) ); $merchant_code = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'merchant_code', true ) ); $secret_key = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'secret_key', true ) ); $two_checkout_order_name = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'two_checkout_order_name', true ) ); $amount = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'amount', true ) ); $quantity = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'quantity', true ) ); $success_returnurl = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'success_returnurl', true ) ); $cancel_returnurl = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'cancel_returnurl', true ) ); $currency = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'currency', true ) ); $customer_email = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'customer_email', true ) ); $billing_first_name = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_first_name', true ) ); $billing_last_name = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_last_name', true ) ); $billing_address = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_address', true ) ); $billing_city = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_city', true ) ); $billing_state = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_state', true ) ); $billing_country = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_country', true ) ); $billing_zipcode = sanitize_text_field( get_post_meta( $post_id, CF72CH_META_PREFIX . 'billing_zipcode', true ) ); $cf72ch_review = get_option( 'cf72ch_review' ); $currency_code = array( 'USD' => 'United States Dollar', 'AUD' => 'Australian Dollar', 'BRL' => 'Brazilian Real', 'CAD' => 'Canadian Dollar', 'CZK' => 'Czech Koruna', 'DKK' => 'Danish Krone', 'EUR' => 'Euro', 'HKD' => 'Hong Kong Dollar', 'HUF' => 'Hungarian Forint', 'INR' => 'Indian Rupee', 'ILS' => 'Israeli New Shekel', 'JPY' => 'Japanese Yen', 'MYR' => 'Malaysian Ringgit', 'MXN' => 'Mexican Peso', 'TWD' => 'New Taiwan Dollar', 'NZD' => 'New Zealand Dollar', 'NOK' => 'Norwegian Krone', 'PHP' => 'Philippine Peso', 'PLN' => 'Polish Zloty', 'GBP' => 'Pound Sterling', 'RUB' => 'Russian Ruble', 'SGD' => 'Singapore Dollar', 'SEK' => 'Swedish Krona', 'CHF' => 'Swiss Franc', 'THB' => 'Thai Baht', ); $currency_code = apply_filters( CF72CH_META_PREFIX .'currency_code', $currency_code ); $payment_mode = array( 'sandbox' => __( 'Sandbox', 'accept-2checkout-payments-using-contact-form-7'), 'production' => __( 'Live', 'accept-2checkout-payments-using-contact-form-7') ); $selected = ''; $args = array( 'post_type' => array( 'page' ), 'orderby' => 'title', 'posts_per_page' => -1 ); $pages = get_posts( $args ); $all_pages = array(); if ( !empty( $pages ) ) { foreach ( $pages as $page ) { $all_pages[$page->ID] = $page->post_title; } } if ( !empty( $post_id ) ) { $cf7 = WPCF7_ContactForm::get_instance( sanitize_text_field( $_REQUEST['post'] ) ); $tags = $cf7->collect_mail_tags(); } echo '
| ' . __( 'To use 2Checkout option, first you need to create and save form tags.', 'accept-2checkout-payments-using-contact-form-7' ). ' ' . __( 'Document Link', 'accept-2checkout-payments-using-contact-form-7' ) . ''. ' | ' . '|
| ' . '' . ' | ' . '' . '' . ' | ' . '
|---|---|
| ' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | ' . '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . ' | ' . '|
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
| ' . '' . '' . ' | '. '' . '' . ' | ' . '
Get Merchant Code from here
', 'accept-2checkout-payments-using-contact-form-7' ), 'order_name' => __( 'Set Order Item Name
', 'accept-2checkout-payments-using-contact-form-7' ), 'secret_key' => __( 'Get Secret Key from here
', 'accept-2checkout-payments-using-contact-form-7' ), 'currency' => __( 'Select the currency.
', 'accept-2checkout-payments-using-contact-form-7' ), 'amount' => __( 'Select field from where amount value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'quantity' => __( 'Select field from where quantity value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'email' => __( 'Select field from where customer email value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'success_returnurl' => __( 'Select page and redirect customer after succesfully payment done.
', 'accept-2checkout-payments-using-contact-form-7' ), 'cancel_returnurl' => __( 'Select page and redirect customer after cancel payment process or payment not done.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_first_name' => __( 'Select field from where billing first name value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_last_name' => __( 'Select field from where billing last name value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_address' => __( 'Select field from where billing address value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_city' => __( 'Select field from where billing city value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_state' => __( 'Select field from where billing state value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_zipcode' => __( 'Select field from where billing zipcode value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'billing_country' => __( 'Select field from where billing country value needs to be retrieved.
Note: Save the FORM details to view the list of fields.
', 'accept-2checkout-payments-using-contact-form-7' ), 'cf72ch_review' => $cf72ch_review, ); wp_enqueue_script( CF72CH_PREFIX . '_modal_js' ); wp_enqueue_script( CF72CH_PREFIX . '_cookie_js' ); wp_localize_script( CF72CH_PREFIX . '_admin_js', 'cf72ch_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'translate_string_cf72ch' => $translation_array ) );