diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2dc47e6e900..181b5f7b9b6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -140,7 +140,7 @@ class Form * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value * @param object $extObject External object * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') - * @param string $moreparam More param to add on a href URL + * @param string $moreparam More param to add on the form action href URL * @param int $notabletag Do no output table tags * @param string $formatfunc Call a specific function to output field * @param string $paramid Key of parameter for id ('id', 'socid') diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 6fe4b0c64a0..e8a32dd0b88 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -753,6 +753,15 @@ 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) + { + $url='https://dashboard.stripe.com/test/customers/'.$stripecu; + if ($servicestatus) + { + $url='https://dashboard.stripe.com/customers/'.$stripecu; + } + print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').''; + } print ''; if (empty($stripecu)) { @@ -850,6 +859,15 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print ''; print $companypaymentmodetemp->stripe_card_ref; + /*if ($companypaymentmodetemp->stripe_card_ref) + { + $url='https://dashboard.stripe.com/test/card/'.$companypaymentmodetemp->stripe_card_ref; + if ($servicestatus) + { + $url='https://dashboard.stripe.com/card/'.$companypaymentmodetemp->stripe_card_ref; + } + print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').''; + }*/ print ''; print ''; print img_credit_card($companypaymentmodetemp->type); diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 192642d44ba..21fefc7b885 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -146,7 +146,7 @@ class Stripe extends CommonObject } catch(Exception $e) { - + $this->error = $e->getMessage(); } } elseif ($createifnotlinkedtostripe) @@ -230,7 +230,7 @@ class Stripe extends CommonObject } catch(Exception $e) { - + $this->error = $e->getMessage(); } } elseif ($createifnotlinkedtostripe)