Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-micro
Commits
c9e34c84
Commit
c9e34c84
authored
Dec 26, 2022
by
carlos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shopify私有app切换修改
parent
9b3ab2ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
ShopifyApp.php
src/Shopify/ShopifyApp.php
+1
-1
AbstractShopify.php
src/Shopify/lib/AbstractShopify.php
+11
-4
No files found.
src/Shopify/ShopifyApp.php
View file @
c9e34c84
...
...
@@ -104,7 +104,7 @@ class ShopifyApp
public
$config
=
[];
public
$defaultApiVersion
=
'202
0-07
'
;
public
$defaultApiVersion
=
'202
2-10
'
;
/**
* ShopifyApp constructor.
...
...
src/Shopify/lib/AbstractShopify.php
View file @
c9e34c84
...
...
@@ -64,12 +64,19 @@ abstract class AbstractShopify
$this
->
pluralizeKey
=
$this
->
pluralizeKey
?:
$this
->
resourceKey
.
's'
;
$this
->
resourceUrl
=
(
$parentResourceUrl
?
"
$parentResourceUrl
/"
:
$config
[
'api_url'
])
.
$this
->
pluralizeKey
.
(
$this
->
id
?
"/
{
$this
->
id
}
"
:
''
);
$this
->
httpRequestJson
=
make
(
CurlHttpRequestJson
::
class
);
if
(
$config
[
'is_private_app'
]
==
1
)
{
if
(
!
isset
(
$config
[
'access_token'
]))
{
throw
new
Exception
(
"请设置access_token值"
);
}
$this
->
httpHeaders
[
'X-Shopify-Access-Token'
]
=
$config
[
'access_token'
];
}
else
{
if
(
isset
(
$config
[
'api_password'
]))
{
$this
->
httpHeaders
[
'X-Shopify-Access-Token'
]
=
$config
[
'api_password'
];
}
elseif
(
!
isset
(
$config
[
'api_password'
]))
{
throw
new
Exception
(
"请设置api_password值"
);
}
}
}
/**
* 调用子集资源
...
...
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