Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
MP-Tsel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dzulfiqar Ridha
MP-Tsel
Commits
5a8b6c58
Commit
5a8b6c58
authored
Apr 15, 2019
by
Dzulfqar Ridha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update metering(getsub) and mashery(only username)
parent
03c76e92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
37 deletions
+3
-37
UserController.php
app/Http/Controllers/UserController.php
+2
-36
MSUserCreateRequest.php
app/Http/Request/MSUserCreateRequest.php
+1
-1
No files found.
app/Http/Controllers/UserController.php
View file @
5a8b6c58
...
@@ -83,7 +83,7 @@ class UserController extends BaseController
...
@@ -83,7 +83,7 @@ class UserController extends BaseController
$response
=
$this
->
masheryClient
()
->
request
(
'POST'
,
'https://api.mashery.com/v3/rest/members'
,
[
$response
=
$this
->
masheryClient
()
->
request
(
'POST'
,
'https://api.mashery.com/v3/rest/members'
,
[
'json'
=>
[
'json'
=>
[
'username'
=>
$request
->
get
(
'username'
),
'username'
=>
$request
->
get
(
'username'
),
'email'
=>
$request
->
get
(
'
email
'
),
'email'
=>
$request
->
get
(
'
username
'
),
'displayName'
=>
$request
->
get
(
'name'
),
'displayName'
=>
$request
->
get
(
'name'
),
'areaStatus'
=>
'active'
,
'areaStatus'
=>
'active'
,
'externalId'
=>
''
,
'externalId'
=>
''
,
...
@@ -144,7 +144,7 @@ class UserController extends BaseController
...
@@ -144,7 +144,7 @@ class UserController extends BaseController
$statusCode
=
200
;
$statusCode
=
200
;
try
{
try
{
$response
=
$this
->
meteringClient
()
->
request
(
'GET'
,
'insert_subs'
,
[
$response
=
$this
->
meteringClient
()
->
request
(
'GET'
,
'insert_subs
/
'
,
[
'query'
=>
[
'query'
=>
[
'username'
=>
$request
->
get
(
'username'
),
'username'
=>
$request
->
get
(
'username'
),
'password'
=>
$request
->
get
(
'password'
),
'password'
=>
$request
->
get
(
'password'
),
...
@@ -171,38 +171,4 @@ class UserController extends BaseController
...
@@ -171,38 +171,4 @@ class UserController extends BaseController
return
response
()
->
json
(
$mResponse
,
$statusCode
);
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
}
public
function
bucketTest
()
{
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
try
{
$response
=
$this
->
meteringClient
()
->
request
(
'GET'
,
'insert_subs'
,
[
'query'
=>
[
'username'
=>
'STORE-FRONT'
,
'password'
=>
'STORE-123'
,
'appsid'
=>
'd0000000000000000072'
,
'apps_name'
=>
'developer03'
,
'msisdn_paired'
=>
'081317200003'
]
]);
$resBody
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$response
->
getStatusCode
()
!=
200
)
{
$statusCode
=
$response
->
getStatusCode
();
$mResponse
->
message
=
$resBody
;
}
else
{
$mResponse
->
success
=
true
;
$mResponse
->
message
=
'success'
;
$mResponse
->
data
=
$resBody
;
}
}
catch
(
\Exception
$e
)
{
$statusCode
=
500
;
$mResponse
->
message
=
$e
->
getMessage
();
}
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
}
}
app/Http/Request/MSUserCreateRequest.php
View file @
5a8b6c58
...
@@ -24,7 +24,7 @@ class MSUserCreateRequest extends FormRequestErrors
...
@@ -24,7 +24,7 @@ class MSUserCreateRequest extends FormRequestErrors
{
{
return
[
return
[
'username'
=>
'required'
,
'username'
=>
'required'
,
'email'
=>
'required'
,
//
'email' => 'required',
'name'
=>
'required'
,
'name'
=>
'required'
,
'password'
=>
'required'
'password'
=>
'required'
];
];
...
...
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