Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (4)
(fix): export account not merchant
· 2ba461cf
Mark Harding
authored
Jul 16, 2019
2ba461cf
(fix): set API key for stripe OO instances
· 959d2470
Mark Harding
authored
Jul 16, 2019
959d2470
(fix): minor patches to stripe connect module
· 1c39ee43
Mark Harding
authored
Jul 16, 2019
1c39ee43
(fix): pass arguments not array
· d4433729
Mark Harding
authored
Jul 16, 2019
d4433729
Hide whitespace changes
Inline
Side-by-side
Common/StaticToInstance.php
View file @
d4433729
...
...
@@ -33,7 +33,7 @@ class StaticToInstance
public
function
__call
(
$method
,
$arguments
)
{
$instance
=
$this
->
class
->
newInstanceWithoutConstructor
();
return
$instance
::
$method
(
$arguments
);
return
$instance
::
$method
(
...
$arguments
);
}
}
\ No newline at end of file
}
Controllers/api/v2/wallet/usd.php
View file @
d4433729
...
...
@@ -59,7 +59,7 @@ class usd implements Interfaces\Api
]);
}
$response
[
'
mercha
nt'
]
=
$
mercha
nt
->
export
();
$response
[
'
accou
nt'
]
=
$
accou
nt
->
export
();
break
;
}
...
...
Core/Payments/PaymentsProvider.php
View file @
d4433729
...
...
@@ -51,5 +51,11 @@ class PaymentsProvider extends Provider
$config
=
$di
->
get
(
'Config'
);
return
new
Stripe\Stripe
(
$di
->
get
(
'Config'
));
},
[
'useFactory'
=>
true
]);
// Stripe
$this
->
di
->
bind
(
'Stripe\Connect\Manager'
,
function
(
$di
)
{
return
new
Stripe\Connect\Manager
();
},
[
'useFactory'
=>
true
]);
}
}
Core/Payments/Stripe/Connect/Account.php
View file @
d4433729
...
...
@@ -116,6 +116,7 @@ class Account
'destination'
,
'status'
,
'verified'
,
'bankAccount'
,
];
/**
...
...
Core/Payments/Stripe/Connect/Manager.php
View file @
d4433729
...
...
@@ -22,7 +22,7 @@ class Manager
public
function
__construct
(
Save
$save
=
null
,
NotificationDelegate
$notificationDelegate
=
null
,
AccountInstance
$accountInstance
AccountInstance
$accountInstance
=
null
)
{
$this
->
save
=
$save
?:
new
Save
();
...
...
Core/Payments/Stripe/Instances/AccountInstance.php
View file @
d4433729
...
...
@@ -2,6 +2,8 @@
namespace
Minds\Core\Payments\Stripe\Instances
;
use
Minds\Common\StaticToInstance
;
use
Minds\Core\Config\Config
;
use
Minds\Core\Di\Di
;
/**
* @method AccountInstance create()
...
...
@@ -10,9 +12,11 @@ use Minds\Common\StaticToInstance;
class
AccountInstance
extends
StaticToInstance
{
public
function
__construct
()
public
function
__construct
(
Config
$config
=
null
)
{
$config
=
$config
??
Di
::
_
()
->
get
(
'Config'
);
\Stripe\Stripe
::
setApiKey
(
$config
->
get
(
'payments'
)[
'stripe'
][
'api_key'
]);
$this
->
setClass
(
new
\Stripe\Account
);
}
}
\ No newline at end of file
}