Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce_paypal-2631778
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-2631778
Commits
03bb3d39
Commit
03bb3d39
authored
10 years ago
by
Ryan Szrama
Browse files
Options
Downloads
Patches
Plain Diff
Properly identify the payment application for PayPal Payments Standard and Pro transactions.
parent
1f72e060
No related branches found
Branches containing commit
Tags
7.x-2.3
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/wpp/commerce_paypal_wpp.module
+2
-0
2 additions, 0 deletions
modules/wpp/commerce_paypal_wpp.module
modules/wps/commerce_paypal_wps.module
+12
-0
12 additions, 0 deletions
modules/wps/commerce_paypal_wps.module
with
14 additions
and
0 deletions
modules/wpp/commerce_paypal_wpp.module
+
2
−
0
View file @
03bb3d39
...
...
@@ -67,6 +67,7 @@ function commerce_paypal_wpp_commerce_payment_method_info() {
'short_title'
=>
t
(
'PayPal WPP'
),
'display_title'
=>
t
(
'Credit card'
),
'description'
=>
t
(
'PayPal Website Payments Pro'
),
'buttonsource'
=>
'CommerceGuys_Cart_PPP'
,
);
return
$payment_methods
;
...
...
@@ -313,6 +314,7 @@ function commerce_paypal_wpp_submit_form_submit($payment_method, $pane_form, $pa
'METHOD'
=>
'DoDirectPayment'
,
'PAYMENTACTION'
=>
commerce_paypal_payment_action
(
$payment_method
[
'settings'
][
'txn_type'
]),
'NOTIFYURL'
=>
commerce_paypal_ipn_url
(
$payment_method
[
'instance_id'
]),
'BUTTONSOURCE'
=>
$payment_method
[
'buttonsource'
],
'CREDITCARDTYPE'
=>
commerce_paypal_wpp_card_type
(
$pane_values
[
'credit_card'
][
'type'
]),
'ACCT'
=>
$pane_values
[
'credit_card'
][
'number'
],
...
...
This diff is collapsed.
Click to expand it.
modules/wps/commerce_paypal_wps.module
+
12
−
0
View file @
03bb3d39
...
...
@@ -20,6 +20,12 @@ function commerce_paypal_wps_commerce_payment_method_info() {
'terminal'
=>
FALSE
,
'offsite'
=>
TRUE
,
'offsite_autoredirect'
=>
TRUE
,
// Because the order form generation code does not have access to a payment
// method info array, we set the bn directly there instead of making use of
// this buttonsource variable. It's here for consistency with other payment
// methods in this package.
'buttonsource'
=>
'CommerceGuys_Cart_PPS'
,
);
return
$payment_methods
;
...
...
@@ -190,6 +196,9 @@ function commerce_paypal_wps_redirect_form($form, &$form_state, $order, $payment
// Specify the current payment method instance ID in the notify_url
'payment_method'
=>
$payment_method
[
'instance_id'
],
// Include the application indicator
'bn'
=>
$payment_method
[
'buttonsource'
],
);
return
commerce_paypal_wps_order_form
(
$form
,
$form_state
,
$order
,
$payment_method
[
'settings'
]
+
$settings
);
...
...
@@ -419,6 +428,9 @@ function commerce_paypal_wps_order_form($form, &$form_state, $order, $settings)
// The path PayPal should send the IPN to
'notify_url'
=>
commerce_paypal_ipn_url
(
$settings
[
'payment_method'
]),
// The application generating the API request
'bn'
=>
'CommerceGuys_Cart_PPS'
,
// Set the correct character set
'charset'
=>
'utf-8'
,
...
...
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