You are here

function stripe_payment_payment_status_info in Stripe 7

Implements hook_payment_status_info().

File

stripe_payment/stripe_payment.module, line 94
Stripe Payment module.

Code

function stripe_payment_payment_status_info() {
  return array(
    new PaymentStatusInfo(array(
      'description' => t('The card number is incorrect.'),
      'status' => STRIPE_PAYMENT_STATUS_INCORRECT_NUMBER,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (incorrect card number)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('The card number is not a valid credit card number.'),
      'status' => STRIPE_PAYMENT_STATUS_INVALID_NUMBER,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (invalid card number)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t("The card's expiration month is invalid."),
      'status' => STRIPE_PAYMENT_STATUS_INVALID_EXPIRY_MONTH,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (invalid expiry month)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t("The card's expiration year is invalid."),
      'status' => STRIPE_PAYMENT_STATUS_INVALID_EXPIRY_YEAR,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (invalid expiry month)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t("The card's security code is invalid."),
      'status' => STRIPE_PAYMENT_STATUS_INVALID_CVC,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (invalid CVC)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('The card has expired.'),
      'status' => STRIPE_PAYMENT_STATUS_EXPIRED_CARD,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (expired card)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t("The card's security code is incorrect."),
      'status' => STRIPE_PAYMENT_STATUS_INCORRECT_CVC,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (incorrect CVC)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('The card was declined.'),
      'status' => STRIPE_PAYMENT_STATUS_CARD_DECLINED,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (card declined)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('There is no card on a customer that is being charged.'),
      'status' => STRIPE_PAYMENT_STATUS_MISSING,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (missing)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('An error occurred while processing the card.'),
      'status' => STRIPE_PAYMENT_STATUS_PROCESSING_ERROR,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (processing error)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('An error occurred while processing the card.'),
      'status' => STRIPE_PAYMENT_STATUS_API_ERROR,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (API error)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('An error occurred while processing the card.'),
      'status' => STRIPE_PAYMENT_STATUS_INVALID_REQUEST,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (invalid request)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('An error occurred while processing the card.'),
      'status' => STRIPE_PAYMENT_STATUS_AUTHENTICATION_ERROR,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (authentication_error)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('An error occurred while processing the card.'),
      'status' => STRIPE_PAYMENT_STATUS_UNKNOWN_ERROR,
      'parent' => PAYMENT_STATUS_FAILED,
      'title' => t('Failed (unknown error)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('Payment completed.'),
      'status' => STRIPE_PAYMENT_STATUS_PAID,
      'parent' => PAYMENT_STATUS_SUCCESS,
      'title' => t('Success (paid)'),
    )),
    new PaymentStatusInfo(array(
      'description' => t('Charge is still un-captured.'),
      'status' => STRIPE_PAYMENT_STATUS_UNCAPTURED,
      'parent' => PAYMENT_STATUS_PENDING,
      'title' => t('Pending (un-captured)'),
    )),
  );
}