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
241
Issues
241
List
Boards
Labels
Service Desk
Milestones
Merge Requests
30
Merge Requests
30
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
Commits
31fdb7fc
Commit
31fdb7fc
authored
48 minutes ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): email issues with wire, and other patches
parent
e091b442
epic/37-wire
1 merge request
!254
WIP: &37 - Multi-currency
Pipeline
#78660744
failed with stages
in 7 minutes and 26 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
17 deletions
+14
-17
usd.php
Controllers/api/v2/wallet/usd.php
+3
-2
wire-received.tpl
Core/Email/Campaigns/Templates/wire-received.tpl
+1
-1
wire-sent.tpl
Core/Email/Campaigns/Templates/wire-sent.tpl
+1
-1
WireReceived.php
Core/Email/Campaigns/WireReceived.php
+1
-1
WireSent.php
Core/Email/Campaigns/WireSent.php
+1
-5
Manager.php
Core/Payments/Stripe/Connect/Manager.php
+7
-7
No files found.
Controllers/api/v2/wallet/usd.php
View file @
31fdb7fc
...
...
@@ -74,7 +74,7 @@ class usd implements Interfaces\Api
$response
=
array
();
switch
(
$pages
[
0
])
{
case
"onboard"
:
case
"onboard
ing
"
:
$account
=
(
new
Payments\Stripe\Connect\Account
())
->
setUserGuid
(
Core\Session
::
getLoggedInUser
()
->
guid
)
->
setUser
(
Core\Session
::
getLoggedInUser
())
...
...
@@ -95,7 +95,8 @@ class usd implements Interfaces\Api
try
{
$stripeConnectManager
=
Core\Di\Di
::
_
()
->
get
(
'Stripe\Connect\Manager'
);
$id
=
$stripeConnectManager
->
add
(
$account
);
$account
=
$stripeConnectManager
->
add
(
$account
);
$response
[
'account'
]
=
$account
->
export
();
}
catch
(
\Exception
$e
)
{
$response
[
'status'
]
=
"error"
;
...
...
This diff is collapsed.
Click to expand it.
Core/Email/Campaigns/Templates/wire-received.tpl
View file @
31fdb7fc
...
...
@@ -2,7 +2,7 @@
$
wireUrl =
"
{
$vars
[
'site_url'
]
}
wallet/tokens/transactions/
{
$vars
[
'contract'
]
}
?
{
$vars
[
'tracking'
]
}
"
;
$
avatarUrl =
"
{
$vars
[
'sender'
]->
getIconUrl
()
}
"
;
$
wireDate =
date('M
d
,
Y
',
($
vars
['
timestamp
']));
$
amount =
number_format($vars['amount'],
2
)
;
$
amount =
$vars['amount']
;
?
>
<table
cellspacing=
"8"
cellpadding=
"8"
border=
"0"
width=
"600"
align=
"center"
>
<tbody>
...
...
This diff is collapsed.
Click to expand it.
Core/Email/Campaigns/Templates/wire-sent.tpl
View file @
31fdb7fc
...
...
@@ -2,7 +2,7 @@
$
wireUrl =
"
{
$vars
[
'site_url'
]
}
wallet/tokens/transactions/
{
$vars
[
'contract'
]
}
?
{
$vars
[
'tracking'
]
}
"
;
$
avatarUrl =
"
{
$vars
[
'receiver'
]->
getIconUrl
()
}
"
;
$
wireDate =
date('M
d
,
Y
',
($
vars
['
timestamp
']));
$
amount =
number_format($vars['amount'],
2
)
;
$
amount =
$vars['amount']
;
?
>
<table
cellspacing=
"8"
cellpadding=
"8"
border=
"0"
width=
"600"
align=
"center"
>
<tbody>
...
...
This diff is collapsed.
Click to expand it.
Core/Email/Campaigns/WireReceived.php
View file @
31fdb7fc
...
...
@@ -69,7 +69,7 @@ class WireReceived extends EmailCampaign
public
function
send
()
{
if
(
$this
->
canSend
())
{
$this
->
mailer
->
queue
(
$this
->
build
());
$this
->
mailer
->
send
(
$this
->
build
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Core/Email/Campaigns/WireSent.php
View file @
31fdb7fc
...
...
@@ -40,7 +40,6 @@ class WireSent extends EmailCampaign
];
$timestamp
=
gettype
(
$this
->
wire
->
getTimestamp
())
===
'object'
?
$this
->
wire
->
getTimestamp
()
->
time
()
:
$this
->
wire
->
getTimestamp
();
$amount
=
$this
->
wire
->
getMethod
()
===
'tokens'
?
BigNumber
::
fromPlain
(
$this
->
wire
->
getAmount
(),
18
)
->
toDouble
()
:
$this
->
wire
->
getAmount
();
$contract
=
$this
->
wire
->
getMethod
()
===
'onchain'
?
'wire'
:
'offchain:wire'
;
...
...
@@ -72,11 +71,9 @@ class WireSent extends EmailCampaign
public
function
send
()
{
if
(
$this
->
canSend
())
{
$this
->
mailer
->
queue
(
$this
->
build
());
$this
->
mailer
->
send
(
$this
->
build
());
}
}
<<<<<<<
HEAD
=======
private
function
getAmountString
(
$wire
)
{
...
...
@@ -94,5 +91,4 @@ class WireSent extends EmailCampaign
return
"
$amount
$currency
"
;
}
>>>>>>>
d85a52e
...
(
feat
)
:
wire
emails
support
multiple
currencies
}
This diff is collapsed.
Click to expand it.
Core/Payments/Stripe/Connect/Manager.php
View file @
31fdb7fc
...
...
@@ -33,10 +33,10 @@ class Manager
/**
* Add a conenct account to stripe
* @param Account $account
* @return
string
* @return
Account
*/
public
function
add
(
Account
$account
)
:
string
{
public
function
add
(
Account
$account
)
:
Account
{
$dob
=
explode
(
'-'
,
$account
->
getDateOfBirth
());
$data
=
[
'managed'
=>
true
,
...
...
@@ -89,14 +89,14 @@ class Manager
throw
new
\Exception
(
$result
->
message
);
}
$
id
=
$result
->
id
;
$
account
->
setId
(
$result
->
id
)
;
// Save reference directly to user entity
$user
=
$account
->
getUser
();
$user
->
setMerchant
([
'service'
=>
'stripe'
,
'id'
=>
$
id
'id'
=>
$
result
->
id
,
]);
$this
->
save
->
setEntity
(
$user
)
...
...
@@ -106,7 +106,7 @@ class Manager
$this
->
notificationDelegate
->
onAccepted
(
$account
);
return
$
id
;
return
$
account
;
}
/**
...
...
@@ -269,7 +269,7 @@ class Manager
// Delete id from user entity
$user
=
$account
->
getUser
();
$user
->
setMerchant
([]);
$user
->
setMerchant
([
'deleted'
=>
true
]);
$this
->
save
->
setEntity
(
$user
)
->
save
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment