- 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.
32 lines
724 B
PHP
32 lines
724 B
PHP
<?php
|
|
|
|
namespace Stripe;
|
|
|
|
/**
|
|
* Class SingletonApiResource.
|
|
*/
|
|
abstract class SingletonApiResource extends ApiResource
|
|
{
|
|
/**
|
|
* @return string the endpoint associated with this singleton class
|
|
*/
|
|
public static function classUrl()
|
|
{
|
|
// Replace dots with slashes for namespaced resources, e.g. if the object's name is
|
|
// "foo.bar", then its URL will be "/v1/foo/bar".
|
|
|
|
/** @phpstan-ignore-next-line */
|
|
$base = \str_replace('.', '/', static::OBJECT_NAME);
|
|
|
|
return "/v1/{$base}";
|
|
}
|
|
|
|
/**
|
|
* @return string the endpoint associated with this singleton API resource
|
|
*/
|
|
public function instanceUrl()
|
|
{
|
|
return static::classUrl();
|
|
}
|
|
}
|