Update stripe.php

This commit is contained in:
ptibogxiv 2019-04-24 15:41:08 +02:00 committed by GitHub
parent 99e56f9cfa
commit c485cc7a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ if ( !empty($conf->global->STRIPE_TEST_WEBHOOK_KEY) && !empty($conf->global->STR
$endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID);
$endpoint->enabled_events = $stripearrayofwebhookevents; $endpoint->enabled_events = $stripearrayofwebhookevents;
if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_TEST_WEBHOOK_ID ) { if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_TEST_WEBHOOK_ID ) {
if ( empty( GETPOST('status', 'alpha') )) { if ( empty(GETPOST('status', 'alpha')) ) {
$endpoint->disabled = true; $endpoint->disabled = true;
} else { } else {
$endpoint->disabled = false; $endpoint->disabled = false;
@ -268,7 +268,7 @@ if ( !empty($conf->global->STRIPE_LIVE_WEBHOOK_KEY) && !empty($conf->global->STR
$endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID);
$endpoint->enabled_events = $stripearrayofwebhookevents; $endpoint->enabled_events = $stripearrayofwebhookevents;
if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_LIVE_WEBHOOK_ID ) { if ( GETPOST('webhook', 'alpha') == $conf->global->STRIPE_LIVE_WEBHOOK_ID ) {
if ( empty( GETPOST('status', 'alpha') )) { if ( empty(GETPOST('status', 'alpha')) ) {
$endpoint->disabled = true; $endpoint->disabled = true;
} else { } else {
$endpoint->disabled = false; $endpoint->disabled = false;