Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce_paypal-3467282
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
commerce_paypal-3467282
Commits
db907e6b
Commit
db907e6b
authored
4 years ago
by
Jonathan Sacksick
Browse files
Options
Downloads
Patches
Plain Diff
Codestyling fixes.
parent
08b48aa0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
commerce_paypal.module
+14
-14
14 additions, 14 deletions
commerce_paypal.module
with
14 additions
and
14 deletions
commerce_paypal.module
+
14
−
14
View file @
db907e6b
...
...
@@ -131,26 +131,26 @@ function commerce_paypal_commerce_checkout_flow_access(CheckoutFlowInterface $ch
* Implements hook_library_info_build().
*/
function
commerce_paypal_library_info_build
()
{
$libraries
=
[];
// Only build the PayPal Credit messaging JS if a PayPal Client ID was set on
// the PayPal Credit messaging settings form.
$client_id
=
\Drupal
::
config
(
'commerce_paypal.credit_messaging_settings'
)
->
get
(
'client_id'
);
if
(
$client_id
)
{
$url
=
'https://www.paypal.com/sdk/js?client-id='
.
$client_id
.
'&components=messages'
;
$libraries
[
'credit_messaging'
]
=
[
'header'
=>
TRUE
,
'js'
=>
[
$url
=>
[
'type'
=>
'external'
,
'attributes'
=>
[
'data-partner-attribution-id'
=>
'CommerceGuys_Cart_SPB'
,
],
if
(
!
$client_id
)
{
return
[];
}
$url
=
sprintf
(
'https://www.paypal.com/sdk/js?client-id=%s&components=messages'
,
$client_id
);
$libraries
[
'credit_messaging'
]
=
[
'header'
=>
TRUE
,
'js'
=>
[
$url
=>
[
'type'
=>
'external'
,
'attributes'
=>
[
'data-partner-attribution-id'
=>
'CommerceGuys_Cart_SPB'
,
],
],
]
;
}
]
,
];
return
$libraries
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment