You are here

public static function PayPalPaymentIPNController::statusMap in PayPal for Payment 7

Returns a map of PayPal statuses to Payment statuses.

Return value

array Keys are PayPal statuses, values are Payment statuses.

3 calls to PayPalPaymentIPNController::statusMap()
PayPalPaymentECPaymentMethodController::statusMap in paypal_payment_ec/includes/PayPalPaymentECPaymentMethodController.inc
Returns a map of PayPal statuses to Payment statuses.
PayPalPaymentIPNController::convertStatus in paypal_payment_ipn/includes/PayPalPaymentIPNController.inc
Converts a PayPal status to a Payment status.
PayPalPaymentIPNControllerTest::testStatusMap in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests statusMap().

File

paypal_payment_ipn/includes/PayPalPaymentIPNController.inc, line 227

Class

PayPalPaymentIPNController
Provides IPN functionality.

Code

public static function statusMap() {
  return array(
    'Canceled_Reversal' => PAYPAL_PAYMENT_STATUS_CANCELLED_REVERSAL,
    'Completed' => PAYMENT_STATUS_SUCCESS,
    'Created' => PAYMENT_STATUS_NEW,
    'Denied' => PAYPAL_PAYMENT_STATUS_DENIED,
    'Expired' => PAYMENT_STATUS_EXPIRED,
    'Failed' => PAYMENT_STATUS_FAILED,
    'Pending' => PAYMENT_STATUS_PENDING,
    'Refunded' => PAYPAL_PAYMENT_STATUS_REFUNDED,
    'Reversed' => PAYPAL_PAYMENT_STATUS_REVERSED,
    // @todo How do Processed and Completed relate to each other?
    'Processed' => PAYMENT_STATUS_SUCCESS,
    'Voided' => PAYMENT_STATUS_AUTHORIZATION_FAILED,
  );
}