From 36f31230b3cb3a66996813036006a7ca14ec853c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Mar 2019 19:27:56 +0100 Subject: [PATCH] FIX url to stripe payment modes card_... --- htdocs/societe/paymentmodes.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index d545a3e1177..ef1c169c768 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -472,7 +472,7 @@ if (empty($reshook)) $_POST['lang_id'] = GETPOST('lang_idrib'.GETPOST('companybankid', 'int'), 'alpha'); $_POST['model'] = GETPOST('modelrib'.GETPOST('companybankid', 'int'), 'alpha'); } - + https://dashboard.stripe.com/search?query=risk_level%3Ahighest&account=acct_1CVGWQLYhjvFj9Sz $id = $socid; $upload_dir = $conf->societe->multidir_output[$object->entity]; $permissioncreate=$user->rights->societe->creer; @@ -762,9 +762,10 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; //print $stripecu; print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); - if ($stripecu && $action != 'editkey_account') + if (! empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') { - if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; + $connect=''; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; $url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$stripecu; if ($servicestatus) { @@ -818,6 +819,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } + print ''."\n"; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''."\n"; print ''; @@ -879,15 +881,17 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print ''; print ''; // Img of credit card print '
'; print $companypaymentmodetemp->stripe_card_ref; - /*if ($companypaymentmodetemp->stripe_card_ref) + if ($companypaymentmodetemp->stripe_card_ref) { - $url='https://dashboard.stripe.com/test/card/'.$companypaymentmodetemp->stripe_card_ref; + $connect=''; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; + $url='https://dashboard.stripe.com/'.$connect.'test/search?query='.$companypaymentmodetemp->stripe_card_ref; if ($servicestatus) { - $url='https://dashboard.stripe.com/card/'.$companypaymentmodetemp->stripe_card_ref; + $url='https://dashboard.stripe.com/'.$connect.'search?query='.$companypaymentmodetemp->stripe_card_ref; } print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').''; - }*/ + } print ''; print img_credit_card($companypaymentmodetemp->type); @@ -971,13 +975,17 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } // Src ID print ''; + $connect=''; + print $src->id; if (!empty($stripeacc)) $connect=$stripeacc.'/'; - $url='https://dashboard.stripe.com/'.$connect.'test/sources/'.$src->id; + //$url='https://dashboard.stripe.com/'.$connect.'test/sources/'.$src->id; + $url='https://dashboard.stripe.com/'.$connect.'test/search?query='.$src->id; if ($servicestatus) { - $url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; + //$url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; + $url='https://dashboard.stripe.com/'.$connect.'search?query='.$src->id; } - print $src->id." ".img_picto($langs->trans('ShowInStripe'), 'object_globe').""; + print " ".img_picto($langs->trans('ShowInStripe'), 'object_globe').""; print '';