PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
Sorry, no. While it IS possible to handle redirection in a custom way on success, it is NOT possible to do this when an error occurs, s2Member handles this with error messages sent back to the Customer, at the top of your Pro Form integration.hcibrent wrote:Yes, can we do the same thing for declines?
Just curious. Thanks.
<?php
add_filter ("ws_plugin__s2member_paypal_api_response", "my_s2_errors");
function my_s2_errors ($response = array ())
{
if (!empty ($response["__error"]) && !empty ($response["L_ERRORCODE0"]))
{
if ((int)$response["L_ERRORCODE0"] === 10422)
$response["__error"] = "Transaction declined. Please use an alternate funding source.";
}
/**/
return $response;
}
?>
Users browsing this forum: Exabot [Bot], Google [Bot] and 0 guests