Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimcoleman/767a83c3e5239ca0d0a0e3e6bd549ec1 to your computer and use it in GitHub Desktop.
Save kimcoleman/767a83c3e5239ca0d0a0e3e6bd549ec1 to your computer and use it in GitHub Desktop.
Point the Authorize.net integration to a different end point (e.g. to use an Authorize.net mirror API)
<?php
/*
* Point the Authorize.net integration for PMPro to a different end point (e.g. to use an Authorize.net mirror API)
*
*/
function my_pmpro_authorizenet_post_url( $url, $environment ) {
if ($environment == "sandbox") {
$url = 'https://domain.com/path-to-the-sandbox-endpoint/';
} else {
$url = 'https://domain.com/path-to-the-live-endpoint/';
}
return $url;
}
add_filter( 'pmpro_authorizenet_post_url', 'my_pmpro_authorizenet_post_url', 10, 2 );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Point the Authorize.net integration to a different end point." at Paid Memberships Pro here: https://www.paidmembershipspro.com/point-the-authorize-net-integration-to-a-different-end-point/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment