siip-stripe-payment_intents/vendor/stripe/stripe-php/lib/Exception/CardException.php
DANYDHSV c43bb924d7 feat: lanzamiento inicial del plugin Generador de Payment Intents
- Implementado servicio backend [PaymentIntentService](cci:2://file:///home/unms/data/ucrm/ucrm/data/plugins/siip-stripe-payment_intents/src/PaymentIntentService.php:8:0-152:1) para manejar interacciones con API de UCRM y Stripe.
- Creado frontend moderno y responsivo en HTML/JS dentro de [public.php](cci:7://file:///home/unms/data/ucrm/ucrm/data/plugins/siip-stripe-payment_intents/public.php:0:0-0:0).
- Agregada búsqueda con autocompletado para clientes.
- Agregada validación para Stripe Customer ID y monto mínimo.
- Integrada la creación de Payment Intents de Stripe para fondos tipo `customer_balance`.
- Agregada documentación (README.md, CHANGELOG.md) y limpieza de archivos legado.
2025-12-16 13:56:31 -06:00

85 lines
2.1 KiB
PHP

<?php
namespace Stripe\Exception;
/**
* CardException is thrown when a user enters a card that can't be charged for
* some reason.
*/
class CardException extends ApiErrorException
{
protected $declineCode;
protected $stripeParam;
/**
* Creates a new CardException exception.
*
* @param string $message the exception message
* @param null|int $httpStatus the HTTP status code
* @param null|string $httpBody the HTTP body as a string
* @param null|array $jsonBody the JSON deserialized body
* @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
* @param null|string $stripeCode the Stripe error code
* @param null|string $declineCode the decline code
* @param null|string $stripeParam the parameter related to the error
*
* @return CardException
*/
public static function factory(
$message,
$httpStatus = null,
$httpBody = null,
$jsonBody = null,
$httpHeaders = null,
$stripeCode = null,
$declineCode = null,
$stripeParam = null
) {
$instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode);
$instance->setDeclineCode($declineCode);
$instance->setStripeParam($stripeParam);
return $instance;
}
/**
* Gets the decline code.
*
* @return null|string
*/
public function getDeclineCode()
{
return $this->declineCode;
}
/**
* Sets the decline code.
*
* @param null|string $declineCode
*/
public function setDeclineCode($declineCode)
{
$this->declineCode = $declineCode;
}
/**
* Gets the parameter related to the error.
*
* @return null|string
*/
public function getStripeParam()
{
return $this->stripeParam;
}
/**
* Sets the parameter related to the error.
*
* @param null|string $stripeParam
*/
public function setStripeParam($stripeParam)
{
$this->stripeParam = $stripeParam;
}
}