View source
<?php
define('PAYPAL_PAYMENT_STATUS_CANCELLED_REVERSAL', 'PAYPAL_PAYMENT_STATUS_CANCELLED_REVERSAL');
define('PAYPAL_PAYMENT_STATUS_DENIED', 'PAYPAL_PAYMENT_STATUS_DENIED');
define('PAYPAL_PAYMENT_STATUS_REFUNDED', 'PAYPAL_PAYMENT_STATUS_REFUNDED');
define('PAYPAL_PAYMENT_STATUS_PARTIALLY_REFUNDED', 'PAYPAL_PAYMENT_STATUS_PARTIALLY_REFUNDED');
define('PAYPAL_PAYMENT_STATUS_REVERSED', 'PAYPAL_PAYMENT_STATUS_REVERSED');
define('PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE', 'PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE');
define('PAYPAL_PAYMENT_STATUS_MULTI_CURRENCY', 'PAYPAL_PAYMENT_STATUS_MULTI_CURRENCY');
define('PAYPAL_PAYMENT_STATUS_REVIEW', 'PAYPAL_PAYMENT_STATUS_REVIEW');
define('PAYPAL_PAYMENT_STATUS_UPGRADE', 'PAYPAL_PAYMENT_STATUS_UPGRADE');
define('PAYPAL_PAYMENT_STATUS_VERIFY', 'PAYPAL_PAYMENT_STATUS_VERIFY');
define('PAYPAL_PAYMENT_STATUS_WAITING_FOR_CLEARANCE', 'PAYPAL_PAYMENT_STATUS_WAITING_FOR_CLEARANCE');
define('PAYPAL_PAYMENT_STATUS_ADDRESS', 'PAYPAL_PAYMENT_STATUS_ADDRESS');
define('PAYPAL_PAYMENT_STATUS_UNILATERAL', 'PAYPAL_PAYMENT_STATUS_UNILATERAL');
define('PAYPAL_PAYMENT_STATUS_INTL', 'PAYPAL_PAYMENT_STATUS_INTL');
define('PAYPAL_PAYMENT_STATUS_COMPLETED_FUNDS_HELD', 'PAYPAL_PAYMENT_STATUS_COMPLETED_FUNDS_HELD');
define('PAYPAL_PAYMENT_STATUS_SUCCESSFULLY_RETURNED', 'paypal_payment_successfully_returned');
function paypal_payment_payment_status_info() {
return array(
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_SUCCESS,
'status' => PAYPAL_PAYMENT_STATUS_CANCELLED_REVERSAL,
'title' => t('Cancelled reversal'),
)),
new PaymentStatusInfo(array(
'description' => t('The payee denied the payment.'),
'parent' => PAYMENT_STATUS_FAILED,
'status' => PAYPAL_PAYMENT_STATUS_DENIED,
'title' => t('Denied'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_FAILED,
'status' => PAYPAL_PAYMENT_STATUS_REFUNDED,
'title' => t('Refunded'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_FAILED,
'status' => PAYPAL_PAYMENT_STATUS_PARTIALLY_REFUNDED,
'title' => t('Partially refunded'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_FAILED,
'status' => PAYPAL_PAYMENT_STATUS_REVERSED,
'title' => t('Reversed'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_PENDING,
'status' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'title' => t('Waiting for capture'),
)),
new PaymentStatusInfo(array(
'parent' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'status' => PAYPAL_PAYMENT_STATUS_MULTI_CURRENCY,
'title' => t('Waiting for capture (currency cannot be accepted automatically)'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_PENDING,
'status' => PAYPAL_PAYMENT_STATUS_REVIEW,
'title' => t('Being reviewed for risk'),
)),
new PaymentStatusInfo(array(
'description' => t('The payment requires an account upgrade, before it can be captured.'),
'parent' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'status' => PAYPAL_PAYMENT_STATUS_UPGRADE,
'title' => t('Waiting for account upgrade'),
)),
new PaymentStatusInfo(array(
'description' => t('The payment requires an account verification, before it can be captured.'),
'parent' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'status' => PAYPAL_PAYMENT_STATUS_VERIFY,
'title' => t('Waiting for account verification'),
)),
new PaymentStatusInfo(array(
'parent' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'status' => PAYPAL_PAYMENT_STATUS_ADDRESS,
'title' => t("Waiting for capture (payer's address cannot be accepted automatically)"),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_PENDING,
'status' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CLEARANCE,
'title' => t('Waiting for clearance'),
)),
new PaymentStatusInfo(array(
'description' => t('The payment is pending because it was made to an email address that is not yet registered or confirmed.'),
'parent' => PAYMENT_STATUS_PENDING,
'status' => PAYPAL_PAYMENT_STATUS_UNILATERAL,
'title' => t('Waiting for email address confirmation'),
)),
new PaymentStatusInfo(array(
'description' => t('The payment is pending because you hold a non-U.S. account and do not have a withdrawal mechanism.'),
'parent' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,
'status' => PAYPAL_PAYMENT_STATUS_INTL,
'title' => t('Waiting for capture (international payment)'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_SUCCESS,
'status' => PAYPAL_PAYMENT_STATUS_COMPLETED_FUNDS_HELD,
'title' => t('Completed (funds are being held back)'),
)),
new PaymentStatusInfo(array(
'parent' => PAYMENT_STATUS_SUCCESS,
'status' => PAYPAL_PAYMENT_STATUS_SUCCESSFULLY_RETURNED,
'title' => t('User successfully returned'),
'description' => t('The user was redirect back from PayPal after a successful payment. The payment was not yet confirmed using a IPN request.'),
)),
);
}