Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
242
Issues
242
List
Boards
Labels
Service Desk
Milestones
Merge Requests
32
Merge Requests
32
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Compare Revisions
99f79b7d11ebea8c4af2094f8a144494889ce5a4...119c6d9a2c9b8b0232a1971e2ccf878c6194cf3d
Source
119c6d9a2c9b8b0232a1971e2ccf878c6194cf3d
Select Git revision
...
Target
99f79b7d11ebea8c4af2094f8a144494889ce5a4
Select Git revision
Compare
Commits (2)
(fix): adding payment method fails because of incorrect customer lookup
· f3a06d68
Mark Harding
authored
22 minutes ago
f3a06d68
(fix): if no customer, return empty list
· 119c6d9a
Mark Harding
authored
22 minutes ago
119c6d9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Manager.php
Core/Payments/Stripe/Customers/Manager.php
+2
-2
Manager.php
Core/Payments/Stripe/PaymentMethods/Manager.php
+4
-0
No files found.
Core/Payments/Stripe/Customers/Manager.php
View file @
119c6d9a
...
...
@@ -27,7 +27,7 @@ class Manager
* @param string $userGuid
* @return Customer
*/
public
function
getFromUserGuid
(
$userGuid
)
:
Customer
public
function
getFromUserGuid
(
$userGuid
)
:
?
Customer
{
$customerId
=
$this
->
lookup
->
get
(
"
{
$userGuid
}
:payments"
)[
'customer_id'
];
...
...
@@ -60,7 +60,7 @@ class Manager
'payment_method'
=>
$customer
->
getPaymentMethod
(),
]);
$this
->
l
u
->
set
(
"
{
$customer
->
getUserGuid
()
}
:payments"
,
[
$this
->
l
ookup
->
set
(
"
{
$customer
->
getUserGuid
()
}
:payments"
,
[
'customer_id'
=>
(
string
)
$stripeCustomer
->
id
]);
...
...
This diff is collapsed.
Click to expand it.
Core/Payments/Stripe/PaymentMethods/Manager.php
View file @
119c6d9a
...
...
@@ -41,6 +41,10 @@ class Manager
}
$customer
=
$this
->
customersManager
->
getFromUserGuid
(
$opts
[
'user_guid'
]);
if
(
!
$customer
)
{
return
new
Response
();
}
$stripePaymentMethods
=
$this
->
paymentMethodInstance
->
all
([
'customer'
=>
$customer
->
getId
(),
'type'
=>
'card'
,
...
...
This diff is collapsed.
Click to expand it.