Overview

Namespaces

  • mcfedr
    • Paypal
      • Exceptions
      • Notifications
      • Products
  • PHP

Classes

  • AdaptivePaymentNotification
  • CartChangeNotification
  • CartNotification
  • MasspayNotification
  • MasspayNotifications
  • Notification
  • PaymentNotification
  • SubscriptionNotification
  • Overview
  • Namespace
  • Class
  • Tree

Class Notification

Describes a notification

Direct known subclasses

mcfedr\Paypal\Notifications\MasspayNotification, mcfedr\Paypal\Notifications\MasspayNotifications, mcfedr\Paypal\Notifications\PaymentNotification

Indirect known subclasses

mcfedr\Paypal\Notifications\AdaptivePaymentNotification, mcfedr\Paypal\Notifications\CartChangeNotification, mcfedr\Paypal\Notifications\CartNotification, mcfedr\Paypal\Notifications\SubscriptionNotification
Abstract
Namespace: mcfedr\Paypal\Notifications
Located at mcfedr/Paypal/Notifications/Notification.php
Methods summary
public
# __construct( mixed $vars )
public boolean
# isOK( mcfedr\Paypal\Authentication $authentication, mcfedr\Paypal\Settings $settings )

Check everything is as expected

Check everything is as expected

Parameters

$authentication
mcfedr\Paypal\Authentication
$authentication
$settings
mcfedr\Paypal\Settings
$settings

Returns

boolean
protected boolean
# isBusinessCorrect( mcfedr\Paypal\Authentication $authentication )

Check that the notification matches the expected business

Check that the notification matches the expected business

Parameters

$authentication
mcfedr\Paypal\Authentication
$authentication

Returns

boolean

Throws

mcfedr\Paypal\Exceptions\NotificationBusinessInvalidException
protected boolean
# isCurrencyCorrect( mcfedr\Paypal\Settings $settings )

Check the correct currency was used

Check the correct currency was used

Parameters

$settings
mcfedr\Paypal\Settings
$settings

Returns

boolean

Throws

mcfedr\Paypal\Exceptions\NotificationCurrencyInvalidException
Constants summary
string REFUND 'refund'
#

type for refund notification

type for refund notification

string CART 'cart'
#

type for cart notification

type for cart notification

string MASSPAY 'masspay'
#

type for masspay notification

type for masspay notification

string MASSPAYS 'masspays'
#

type for masspay notification

type for masspay notification

string SUBSCRIPTION 'subscription'
#

type for subscription notifications

type for subscription notifications

string ADAPTIVE 'adaptive'
#
string TXT_CART 'cart'
#
string TXT_WEB_ACCEPT 'web_accept'
#
string TXT_MASSPAY 'masspay'
#
string TXT_SUBSCRIPTION_START 'subscr_signup'
#
string TXT_SUBSCRIPTION_PAYMENT 'subscr_payment'
#
string TXT_SUBSCRIPTION_MODIFY 'subscr_modify'
#
string TXT_SUBSCRIPTION_FAILED 'subscr_failed'
#
string TXT_SUBSCRIPTION_EXPIRE 'subscr_eot'
#
string TXT_SUBSCRIPTION_CANCEL 'subscr_cancel'
#
string TXT_ADAPTIVE_CREATE 'Adaptive Payment PAY'
#
string TXT_ADAPTIVE_ADJUSTMENT 'Adjustment'
#
Properties summary
public string $type
#

Type of notification

Type of notification

See

mcfedr\Paypal\Notifications\Notification::REFUND
mcfedr\Paypal\Notifications\Notification::CART
mcfedr\Paypal\Notifications\Notification::MASSPAY
mcfedr\Paypal\Notifications\Notification::SUBSCRIPTION
mcfedr\Paypal\Notifications\Notification::ADAPTIVE
public string $transactionType
#

Type of transaction (paypal)

Type of transaction (paypal)

See

mcfedr\Paypal\Notifications\Notification::TXT_CART
mcfedr\Paypal\Notifications\Notification::TXT_WEB_ACCEPT
mcfedr\Paypal\Notifications\Notification::TXT_MASSPAY
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_START
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_PAYMENT
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_MODIFY
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_FAILED
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_EXPIRE
mcfedr\Paypal\Notifications\Notification::TXT_SUBSCRIPTION_CANCEL
mcfedr\Paypal\Notifications\Notification::TXT_ADAPTIVE_CREATE
mcfedr\Paypal\Notifications\Notification::TXT_ADAPTIVE_ADJUSTMENT
public string $transactionId
#

Paypals id for this transaction

Paypals id for this transaction

public string $parentTransactionId
#

The original transaction (for refunds)

The original transaction (for refunds)

public integer $invoiceId
#

The invoice id you sent as part of this transaction

The invoice id you sent as part of this transaction

public string $custom
#

The custom data you sent

The custom data you sent

public float $total
#

The total amount paid You should check this is what you expect it to be

The total amount paid You should check this is what you expect it to be

public float $amount
#

The amount paid minus shipping and handling

The amount paid minus shipping and handling

public string $currency
#

Currency paid in

Currency paid in

public float $fee
#

The paypal fee (you received mcfedr\Paypal\Notifications\Notification::$amount-mcfedr\Paypal\Notifications\Notification::$fee)

The paypal fee (you received mcfedr\Paypal\Notifications\Notification::$amount-mcfedr\Paypal\Notifications\Notification::$fee)

public string $business
#

Who was paid

Who was paid

public string $status
#

Status of payment The status of the payment: Canceled_Reversal: A reversal has been canceled. For example, you won a dispute with the customer, and the funds for the transaction that was reversed have been returned to you. Completed: The payment has been completed, and the funds have been added successfully to your account balance. Created: A German ELV payment is made using Express Checkout. Denied: You denied the payment. This happens only if the payment was previously pending because of possible reasons described for the pending_reason variable or the Fraud_Management_Filters_x variable. Expired: This authorization has expired and cannot be captured. Failed: The payment has failed. This happens only if the payment was made from your customer’s bank account. Pending: The payment is pending. See pending_reason for more information. Refunded: You refunded the payment. Reversed: A payment was reversed due to a chargeback or other type of reversal. The funds have been removed from your account balance and returned to the buyer. The reason for the reversal is specified in the ReasonCode element. Processed: A payment has been accepted. Voided: This authorization has been voided.

Status of payment The status of the payment: Canceled_Reversal: A reversal has been canceled. For example, you won a dispute with the customer, and the funds for the transaction that was reversed have been returned to you. Completed: The payment has been completed, and the funds have been added successfully to your account balance. Created: A German ELV payment is made using Express Checkout. Denied: You denied the payment. This happens only if the payment was previously pending because of possible reasons described for the pending_reason variable or the Fraud_Management_Filters_x variable. Expired: This authorization has expired and cannot be captured. Failed: The payment has failed. This happens only if the payment was made from your customer’s bank account. Pending: The payment is pending. See pending_reason for more information. Refunded: You refunded the payment. Reversed: A payment was reversed due to a chargeback or other type of reversal. The funds have been removed from your account balance and returned to the buyer. The reason for the reversal is specified in the ReasonCode element. Processed: A payment has been accepted. Voided: This authorization has been voided.

public DateTime $date
#

Time the payment was made

Time the payment was made

public boolean $resent
#

Has this notification been sent before

Has this notification been sent before

public boolean $sandbox
#

Is this a sandbox notification

Is this a sandbox notification

Paypal API documentation generated by ApiGen 2.8.0