TP-Link ER605 Router on ATT Arris Modem

20 days ago

AT&T Arris DSL MODEM

Open up outside access:


Set up IP address passthru via IP Nbr:

Optional use MAC address:

Redirect port 443 to ER605 Device: (notice restriction to Torguard VPN)



TP-Link ER605



Set up LAN IP ##'s

Redirect ports to specific IP ##'s

Open up remote access:

Allow external pinging: https://www.reddit.com/r/TpLink/comments/100q9id/er605_can_i_enable_respond_to_ping_from_wan/
Mark Edwards

,

---

Google reCaptcha migration to project

207 days ago

Article written from this source.

Google is migrating all of its reCaptcha keys over to google-projects. this is fairly simple, but notice the old secret keys are now part of the “legacy key” section.

Notice key:
Mark Edwards

,

---

move from dev to live (and back again)

456 days ago

DEV TO LIVE:

change /home/ajcomptonpesl.com/domains/dev.ajcomptonpesl.com/public_html/wp-config.php
change /home/ajcomptonpesl.com/domains/dev.ajcomptonpesl.com/public_html/wp-content/uploads/elementor/css/post-15.css
mv -i -v public_html public_html-SAVED ;
ln -s /home/ajcomptonpesl.com/domains/dev.ajcomptonpesl.com/public_html/ /home/ajcomptonpesl.com//

TO RESET:

rm -v -i ./public_html
mv -i -v public_html-SAVED public_html ;
change /home/ajcomptonpesl.com/domains/dev.ajcomptonpesl.com/public_html/wp-config.php
change /home/ajcomptonpesl.com/domains/dev.ajcomptonpesl.com/public_html/wp-content/uploads/elementor/css/post-15.css
bash -vx ~/flushCache.bsh ;

Mark Edwards

,

---

mariadb installation on Rocky Linux

458 days ago

Mariadb 10.5 on Rocky Linux 2024-09-03

Mariadb installation the correct way
sudo dnf  install wget  ; 
#
wget https://r.mariadb.com/downloads/mariadb_repo_setup   ;
#
echo "6083ef1974d11f49d42ae668fb9d513f7dc2c6276ffa47caed488c4b47268593 mariadb_repo_setup" 
    | sha256sum -c -   ;
#
chmod +x    ./mariadb_repo_setup   ;
#
sudo ./mariadb_repo_setup 
   --mariadb-server-version="mariadb-10.5"    ;
#
## Install MariaDB Community Server and package dependencies:
sudo dnf  --assumeyes install mariadb-server ;
======================================= OLD WAY: (does not seem to install the correct version!)
cat  <<<END  >  /etc/yum.repos.d/mariadb.repo   ;
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
END
#
dnf     --assumeyes install mariadb-server   ;
=========================
systemctl start mariadb.service;
systemctl enable mariadb.service;
##You can now verify the status of the MariaDB service using the following command:
systemctl  status mariadb.service ;
Mark Edwards

,

---

Passing custom fields from WooCommerce to Stripe Payments

477 days ago

First, your domain must pass the certification test!

certification tester

One: name the custom field

Notice leading underscore to designate a meta field: _billing_clients_email



Two: Create a code snippet


Click here for instructions to add snippet plugin first


// added by mark edwards 2024-05-22
// 
// 
// https://www.wpservices.com/how-to-get-your-custom-checkout-field-value-in-woocommerce/

add_filter(‘wc_stripe_payment_intent_args’, function($args, $order) { $orderNbr = WC()->session->get(‘order_awaiting_payment’); $order = new WC_Order($orderNbr);

$args[‘metadata’][‘orderNbr’] = $orderNbr ; $args[‘metadata’][‘clients_email’] = $order->get_meta(‘_billing_clients_email’) ; $args[‘metadata’][‘first_name’] = $order->get_billing_first_name() ; // 2024-08-17 $args[‘metadata’][‘last_name’] = $order->get_billing_last_name() ; // 2024-08-17

return $args; }, 10, 2);
DONT FORGET TO RESTART PHP-FPM IF THAT IS HOW PHP IS RUNNING! ! !


Three: Name an endpoint



Last, create an endpoint on server:

Name this identically to the Stripe Endpoint name. Most of this code is provided for you when the endpoint is created!
require ‘vendor/autoload.php’;

// The library needs to be configured with your account’s secret key.
// Ensure the key is kept out of any version control system you might be using.
$stripe = new StripeStripeClient(‘sk_test_XXXXXXXXXXXXXXXXX’);

// This is your Stripe CLI webhook secret for testing your endpoint locally.
$endpoint_secret = ‘whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX’;

$payload = @file_get_contents(‘php://input’);
$sig_header = $_SERVER[‘HTTP_STRIPE_SIGNATURE’];
$event = null;

try { error_log(‘’); error_log(‘Endpoint Test’); error_log(FILE);

$event = StripeWebhook::constructEvent( $payload, $sig_header, $endpoint_secret ); error_log(‘results:’); // too much stuff here! error_log(print_r($event->data , true)); error_log(print_r($event->data[‘object’][‘billing_details’][‘email’] , true)); error_log(print_r($event->data[‘object’][‘billing_details’][‘name’] , true)); error_log(print_r($event->data->object->metadata->clients_email , true));

} catch(UnexpectedValueException $e) { // Invalid payload http_response_code(400); exit();
} catch(StripeExceptionSignatureVerificationException $e) { // Invalid signature http_response_code(400); exit();
}

// Handle the event
echo ‘Received unknown event type ‘ . $event->type;

http_response_code(200);
Mark Edwards

,

---

« Older

Manage