Skip to content
Commit 16bcf04d authored by clive  murden's avatar clive murden
Browse files

Commit

From 4cf68d4f90b93d57328a410909fe3e6e2602e185 Mon Sep 17 00:00:00 2001
From: Anthony Lindsay <anthony@netrunner.ie>
Date: Fri, 12 May 2017 12:13:15 +0100
Subject: [PATCH] Paypal seems to not have mc_amount3 in its ipn, so we'll also
 check for mc_gross for the value.

---
 ms_core/gateways/ms_paypal_wps/ms_paypal_wps.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ms_core/gateways/ms_paypal_wps/ms_paypal_wps.module b/ms_core/gateways/ms_paypal_wps/ms_paypal_wps.module
index 13e3256..125e3c8 100644
--- a/ms_core/gateways/ms_paypal_wps/ms_paypal_wps.module
+++ b/ms_core/gateways/ms_paypal_wps/ms_paypal_wps.module
@@ -346,7 +346,7 @@ function ms_paypal_wps_process_ipn($ipn, $order, $gateway) {
       $trial_period = isset($ipn['period1']) ? explode(' ', $ipn['period1']) : array('', '');
       $recurring_schedule = array(
         'total_occurrences' => (isset($ipn['recur_times'])) ? $ipn['recur_times'] : 0,
-        'main_amount' => isset($ipn['mc_amount3']) ? $ipn['mc_amount3'] : isset($ipn['amount3']) ? $ipn['amount3'] : 0,
+        'main_amount' => isset($ipn['mc_gross']) ? $ipn['mc_gross'] : isset($ipn['mc_amount3']) ? $ipn['mc_amount3'] : isset($ipn['amount3']) ? $ipn['amount3'] : 0,
         'main_length' => $main_period[0],
         'main_unit' => $main_period[1],
         'has_trial' => ($trial_period[0]) ? TRUE : FALSE,
--
parent 11d03933
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment