Browse Source

! And another one that needs dealing with per #1169 - this should leave subscr_signup as the only one outstanding not actually treated in the code.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
498ce2f583
2 changed files with 4 additions and 4 deletions
  1. 4 1
      Sources/Subscriptions-PayPal.php
  2. 0 3
      subscriptions.php

+ 4 - 1
Sources/Subscriptions-PayPal.php

@@ -318,7 +318,10 @@ class paypal_payment
 	 */
 	public function isCancellation()
 	{
-		if (substr($_POST['txn_type'], 0, 13) === 'subscr_cancel')
+		// subscr_cancel is sent when the user cancels, subscr_eot is sent when the subscription reaches final payment
+		// Neither require us to *do* anything as per performCancel().
+		// subscr_eot, if sent, indicates an end of payments term.
+		if (substr($_POST['txn_type'], 0, 13) === 'subscr_cancel' || substr($_POST['txn_type'], 0, 10) === 'subscr_eot')
 			return true;
 		else
 			return false;

+ 0 - 3
subscriptions.php

@@ -275,9 +275,6 @@ else
 {
 	// Some other "valid" transaction such as:
 	//
-	// subscr_eot: End of term - sent when a subscription ends at a given term date. Normally should not occur because either
-	// a paid sub is a one-off payment, or it's recurring without a fixed term.
-	//
 	// subscr_signup: This IPN response (txn_type) is sent only the first time the user signs up for a subscription.
 	// It then does not fire in any event later. This response is received somewhere before or after the first payment of
 	// subscription is received (txn_type=subscr_payment) which is what we do process