Skip to content

Commit

Permalink
Update stripe.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Apr 24, 2019
1 parent 99e56f9 commit c485cc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/stripe/admin/stripe.php
Expand Up @@ -206,7 +206,7 @@
$endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID);
$endpoint->enabled_events = $stripearrayofwebhookevents;
if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_TEST_WEBHOOK_ID ) {
if ( empty( GETPOST('status', 'alpha') )) {
if ( empty(GETPOST('status', 'alpha')) ) {
$endpoint->disabled = true;
} else {
$endpoint->disabled = false;
Expand Down Expand Up @@ -261,14 +261,14 @@
$url = dol_buildpath('/public/stripe/ipn.php', 2);
$out.= '<input type="text" id="onlinelivewebhookurl" class="quatrevingtpercent" value="'.$url.'">';
$out.= ajax_autoselect("onlinelivewebhookurl", 0);
print '<br />'.$out;
print '<br />'.$out;
print '</td><td>';
if ( !empty($conf->global->STRIPE_LIVE_WEBHOOK_KEY) && !empty($conf->global->STRIPE_LIVE_SECRET_KEY) && !empty($conf->global->STRIPE_LIVE_WEBHOOK_ID) ) {
\Stripe\Stripe::setApiKey($conf->global->STRIPE_LIVE_SECRET_KEY);
$endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID);
$endpoint->enabled_events = $stripearrayofwebhookevents;
if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_LIVE_WEBHOOK_ID ) {
if ( empty( GETPOST('status', 'alpha') )) {
if ( empty(GETPOST('status', 'alpha')) ) {
$endpoint->disabled = true;
} else {
$endpoint->disabled = false;
Expand Down

0 comments on commit c485cc7

Please sign in to comment.