Merge pull request #8386 from ptibogxiv/patch-21
FIX support for stripeconnect mode
This commit is contained in:
commit
f75334f131
@ -79,7 +79,7 @@ if (! empty($conf->stripe->enabled))
|
|||||||
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox','alpha'))
|
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox','alpha'))
|
||||||
{
|
{
|
||||||
$service = 'StripeLive';
|
$service = 'StripeLive';
|
||||||
$servicestatus = 0;
|
$servicestatus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$stripe = new Stripe($db);
|
$stripe = new Stripe($db);
|
||||||
@ -602,7 +602,7 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'setassourcedefault')
|
elseif ($action == 'setassourcedefault')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$cu = \Stripe\Customer::retrieve($stripecu);
|
$cu=$stripe->customerStripe($object->id, $stripeacc, $servicestatus);
|
||||||
$cu->default_source = (string) $source;
|
$cu->default_source = (string) $source;
|
||||||
$result = $cu->save();
|
$result = $cu->save();
|
||||||
|
|
||||||
@ -618,7 +618,7 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'deletecard')
|
elseif ($action == 'deletecard')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$cu = \Stripe\Customer::retrieve($stripecu);
|
$cu=$stripe->customerStripe($object->id, $stripeacc, $servicestatus);
|
||||||
|
|
||||||
$cu->sources->retrieve("$source")->detach();
|
$cu->sources->retrieve("$source")->detach();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user