Class Mage_Paypal_Model_Ipn

Description

PayPal Instant Payment Notification processor model

Located in /Paypal/Model/Ipn.php (line 30)


	
			
Class Constant Summary
DEFAULT_LOG_FILE = 'paypal_unknown_ipn.log'
Variable Summary
Method Summary
array|string getRequestData ([string $key = null])
void processIpnRequest ( $request, [ $httpAdapter = null])
string|Mage_Sales_Model_Order_Status_History _createIpnComment ([string $comment = ''], [bool $addToHistory = false])
void _debug (mixed $debugData)
string _filterPaymentStatus (string $ipnPaymentStatus)
void _postBack ( $httpAdapter)
void _processOrder ()
void _verifyOrder ()
Variables
Mage_Paypal_Model_Config $_config = null (line 55)
  • access: protected
array $_debugData = array() (line 75)

Collected debug information

  • access: protected
Mage_Paypal_Model_Info $_info = null (line 62)

PayPal info instance

  • access: protected
mixed $_order = null (line 42)
  • access: protected
mixed $_recurringProfile = null (line 49)
  • access: protected
array $_request = array() (line 68)

IPN request data

  • access: protected
Methods
getRequestData (line 83)

IPN request data getter

  • access: public
array|string getRequestData ([string $key = null])
  • string $key
processIpnRequest (line 98)

Get ipn data, send verification to PayPal, run corresponding handler

  • throws: Exception
  • access: public
void processIpnRequest ( $request, [ $httpAdapter = null])
  • array $request
  • Zend_Http_Client_Adapter_Interface $httpAdapter
_createIpnComment (line 555)

Generate an "IPN" comment with additional explanation.

Returns the generated comment or order status history object

  • access: protected
string|Mage_Sales_Model_Order_Status_History _createIpnComment ([string $comment = ''], [bool $addToHistory = false])
  • string $comment
  • bool $addToHistory
_debug (line 668)

Log debug data to file

  • access: protected
void _debug (mixed $debugData)
  • mixed $debugData
_filterPaymentStatus (line 641)

Filter payment status from NVP into paypal/info format

  • access: protected
string _filterPaymentStatus (string $ipnPaymentStatus)
  • string $ipnPaymentStatus
_getOrder (line 167)

Load and validate order, instantiate proper configuration

  • throws: Exception
  • access: protected
Mage_Sales_Model_Order _getOrder ()
_getRecurringProfile (line 194)

Load recurring profile

  • throws: Exception
  • access: protected
Mage_Sales_Model_Recurring_Profile _getRecurringProfile ()
_importPaymentInformation (line 576)

Map payment information from IPN to payment object Returns true if there were changes in information

  • access: protected
bool _importPaymentInformation (Mage_Payment_Model_Info $payment)
_postBack (line 132)

Post back to PayPal to check whether this request is a valid one

  • access: protected
void _postBack ( $httpAdapter)
  • Zend_Http_Client_Adapter_Interface $httpAdapter
_processOrder (line 239)

IPN workflow implementation Everything should be added to order comments. In positive processing cases customer will get email notifications.

Admin will be notified on errors.

  • access: protected
void _processOrder ()
_processRecurringProfile (line 306)

Process notification from recurring profile payments

  • access: protected
void _processRecurringProfile ()
_registerMasspaymentsSuccess (line 541)

TODO

The status "Processed" is used when all Masspayments are successful

  • access: protected
void _registerMasspaymentsSuccess ()
_registerPaymentAuthorization (line 507)

Register authorized payment

  • access: protected
void _registerPaymentAuthorization ()
_registerPaymentCapture (line 371)

Process completed payment (either full or partial)

  • access: protected
void _registerPaymentCapture ()
_registerPaymentDenial (line 399)

Process denied payment notification

  • access: protected
void _registerPaymentDenial ()
_registerPaymentFailure (line 413)

Treat failed payment as order cancellation

  • access: protected
void _registerPaymentFailure ()
_registerPaymentPending (line 477)

Process payment pending notification

  • throws: Exception
  • access: public
void _registerPaymentPending ()
_registerPaymentRefund (line 424)

Process a refund or a chargeback

  • access: protected
void _registerPaymentRefund ()
_registerPaymentReversal (line 452)

Process payment reversal notification

  • access: protected
void _registerPaymentReversal ()
_registerPaymentVoid (line 526)

Process voided authorization

  • access: protected
void _registerPaymentVoid ()
_registerRecurringProfilePaymentCapture (line 335)

Register recurring payment notification, create and process order

  • access: protected
void _registerRecurringProfilePaymentCapture ()
_verifyOrder (line 219)

Validate incoming request data, as PayPal recommends

void _verifyOrder ()
Class Constants
DEFAULT_LOG_FILE = 'paypal_unknown_ipn.log' (line 37)

Default log filename

Documentation generated on Fri, 11 Feb 2011 17:07:00 +0200 by phpDocumentor 1.4.3