Clean code

This commit is contained in:
Laurent Destailleur 2019-09-23 19:29:18 +02:00
parent 5cd4455649
commit 31cc7e0610

View File

@ -146,7 +146,7 @@ $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE;
dol_syslog("Stripe IPN was called with event->type = ".$event->type); dol_syslog("***** Stripe IPN was called with event->type = ".$event->type);
if ($event->type == 'payout.created') { if ($event->type == 'payout.created') {
@ -404,18 +404,7 @@ elseif ($event->type == 'charge.failed') {
// TODO: Redirect to paymentko.php // TODO: Redirect to paymentko.php
} }
elseif (($event->type == 'source.chargeable') && ($event->data->object->type == 'three_d_secure') && ($event->data->object->three_d_secure->authenticated==true)) { elseif (($event->type == 'source.chargeable') && ($event->data->object->type == 'three_d_secure') && ($event->data->object->three_d_secure->authenticated==true)) {
// This event is deprecated.
$fulltag=$event->data->object->metadata->FULLTAG;
dol_syslog("fulltag=".$fulltag);
// Save into $tmptag all metadata
$tmptag=dolExplodeIntoArray($fulltag, '.', '=');
$stripe=new Stripe($db);
/*
$stripeacc = $stripe->getStripeAccount($service); // Stripe OAuth connect account of dolibarr user (no network access here)
$stripecu = $stripe->getStripeCustomerAccount($tmptag['CUS'], $servicestatus); // Get thirdparty cu_...
$charge=$stripe->createPaymentStripe($event->data->object->amount/100, $event->data->object->currency, $origin, $item, $event->data->object->id, $stripecu, $stripeacc, $servicestatus);
*/
} }
http_response_code(200); // PHP 5.4 or greater http_response_code(200); // PHP 5.4 or greater