CRM_Core_Payment_PayPalProIPN
class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN
Properties
static | $_now | from CRM_Core_Payment_BaseIPN | |
protected array | $_inputParameters | Input parameters from payment processor. Store these so that the code does not need to keep retrieving from the http request | |
protected bool | $_isRecurring | Only used by AuthorizeNetIPN. | from CRM_Core_Payment_BaseIPN |
protected bool | $_isFirstOrLastRecurringPayment | Only used by AuthorizeNetIPN. | from CRM_Core_Payment_BaseIPN |
static | $_paymentProcessor | ||
protected array | $_invoiceData | Store for the variables from the invoice string. | |
protected | $_isPaymentExpress | Is this a payment express transaction. | |
protected string | $_component | Are we dealing with an event an 'anything else' (contribute) |
Methods
Constructor function.
Validate incoming data.
Load objects related to contribution.
Set contribution to failed.
Handled pending contribution status.
Process cancelled payment outcome.
No description
No description
get the values from the rp_invoice_id string.
Set $this->_invoiceData from the input array
No description
Process recurring contributions.
No description
Gets PaymentProcessorID for PayPal
This is the main function to call. It should be sufficient to instantiate the class (with the input parameters) & call this & all will be done
No description
Handle payment express IPNs.
Function check if transaction already exists.
Details
at line 69
__construct(array $inputData)
Constructor function.
in CRM_Core_Payment_BaseIPN at line 74
setInputParameters(array $parameters)
Store input array on the class.
in CRM_Core_Payment_BaseIPN at line 104
bool
validateData(array $input, array $ids, array $objects, bool $required = TRUE, int $paymentProcessorID = NULL)
Validate incoming data.
This function is intended to ensure that incoming data matches It provides a form of pseudo-authentication - by checking the calling fn already knows the correct contact id & contribution id (this can be problematic when that has changed in the meantime for transactions that are delayed & contacts are merged in-between. e.g Paypal allows you to resend Instant Payment Notifications if you, for example, moved site and didn't update your IPN URL.
in CRM_Core_Payment_BaseIPN at line 154
bool|array
loadObjects(array $input, array $ids, array $objects, bool $required, int $paymentProcessorID, array $error_handling = NULL)
Load objects related to contribution.
in CRM_Core_Payment_BaseIPN at line 209
bool
failed(array $objects, object $transaction, array $input = array())
Set contribution to failed.
in CRM_Core_Payment_BaseIPN at line 291
bool
pending(array $objects, object $transaction)
Handled pending contribution status.
in CRM_Core_Payment_BaseIPN at line 307
bool
cancelled(array $objects, CRM_Core_Transaction $transaction, array $input = array())
Process cancelled payment outcome.
in CRM_Core_Payment_BaseIPN at line 387
bool
unhandled(array $objects, CRM_Core_Transaction $transaction)
Rollback unhandled outcomes.
in CRM_Core_Payment_BaseIPN at line 449
completeTransaction(array $input, array $ids, array $objects, CRM_Core_Transaction $transaction, bool $recur = FALSE)
deprecated
deprecated
in CRM_Core_Payment_BaseIPN at line 462
bool
getBillingID(array $ids)
Get site billing ID.
in CRM_Core_Payment_BaseIPN at line 495
array
sendMail(array $input, array $ids, array $objects, array $values, bool $recur = FALSE, bool $returnMessageText = FALSE)
deprecated
deprecated
at line 86
mixed
getValue(string $name, bool $abort = TRUE)
get the values from the rp_invoice_id string.
at line 98
setInvoiceData()
Set $this->_invoiceData from the input array
at line 146
mixed
retrieve(string $name, string $type, string $location = 'POST', bool $abort = TRUE)
at line 166
bool
recur(array $input, array $ids, array $objects, bool $first)
Process recurring contributions.
at line 331
bool
single($input, $ids, $objects, bool $recur = FALSE, bool $first = FALSE)
at line 392
int
getPayPalPaymentProcessorID()
Gets PaymentProcessorID for PayPal
at line 417
bool
main()
This is the main function to call. It should be sufficient to instantiate the class (with the input parameters) & call this & all will be done
at line 506
bool
getInput($input, $ids)
at line 552
handlePaymentExpress()
Handle payment express IPNs.
For one off IPNS no actual response is required Recurring is more difficult as we have limited confirmation material lets look up invoice id in recur_contribution & rely on the unique transaction id to ensure no duplicated this may not be acceptable to all sites - e.g. if they are shipping or delivering something in return then the quasi security of the ids array might be required - although better to http://stackoverflow.com/questions/4848227/validate-that-ipn-call-is-from-paypal but let's assume knowledge on invoice id & schedule is enough for now esp for donations only contribute is handled
at line 608
bool|void
transactionExists(string $trxn_id)
Function check if transaction already exists.