name file | size | edit | permission | action |
---|---|---|---|---|
.env | 2733 KB | December 22 2024 06:20:07 | 0644 | |
404.html | 58370 KB | November 20 2024 15:32:22 | 0644 | |
502.html | 58368 KB | November 20 2024 15:32:22 | 0644 | |
Modules | - | December 11 2024 21:02:56 | 0755 | |
README.md | 4158 KB | February 14 2023 12:31:56 | 0644 | |
app | - | December 11 2024 17:57:48 | 0755 | |
artisan | 1686 KB | February 14 2023 12:31:56 | 0644 | |
bootstrap | - | December 11 2024 20:23:36 | 0755 | |
composer.json | 3761 KB | December 11 2024 22:15:00 | 0644 | |
composer.lock | 512048 KB | December 11 2024 22:13:28 | 0644 | |
config | - | June 15 2025 02:09:36 | 0755 | |
database | - | December 05 2024 20:18:12 | 0755 | |
dfsdf dfds fd fds findex.html | 1420 KB | November 20 2024 15:32:24 | 0644 | |
error_log | 19016717 KB | July 18 2025 20:07:38 | 0644 | |
firoz | - | December 23 2024 13:24:46 | 0755 | |
index.php | 1667 KB | December 14 2024 05:20:36 | 0644 | |
lang | - | December 11 2024 21:02:48 | 0755 | |
modules_statuses.json | 472 KB | November 20 2024 15:32:24 | 0644 | |
mpos | - | March 31 2025 02:36:31 | 0755 | |
package.json | 226 KB | February 14 2023 12:31:56 | 0644 | |
phpunit.xml | 1146 KB | February 14 2023 12:31:56 | 0644 | |
public | - | March 31 2025 02:36:31 | 0755 | |
resources | - | December 11 2024 21:10:22 | 0755 | |
routes | - | June 15 2025 02:09:31 | 0755 | |
storage | - | December 11 2024 21:12:44 | 0755 | |
tests | - | December 05 2024 20:18:12 | 0755 | |
vendor | - | December 11 2024 22:13:30 | 0755 | |
vite.config.js | 263 KB | February 14 2023 12:31:56 | 0644 |
Card
object: once chargeable, they can be charged, or can be
* attached to customers.
*
* Stripe doesn't recommend using the deprecated Sources API.
* We recommend that you adopt the PaymentMethods API.
* This newer API provides access to our latest features and payment method types.
*
* Related guides: Sources API and Sources & Customers.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $ach_credit_transfer
* @property null|\Stripe\StripeObject $ach_debit
* @property null|\Stripe\StripeObject $acss_debit
* @property null|\Stripe\StripeObject $alipay
* @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use
sources.
* @property null|\Stripe\StripeObject $au_becs_debit
* @property null|\Stripe\StripeObject $bancontact
* @property null|\Stripe\StripeObject $card
* @property null|\Stripe\StripeObject $card_present
* @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key.
* @property null|\Stripe\StripeObject $code_verification
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use
sources.
* @property null|string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
* @property null|\Stripe\StripeObject $eps
* @property string $flow The authentication flow
of the source. flow
is one of redirect
, receiver
, code_verification
, none
.
* @property null|\Stripe\StripeObject $giropay
* @property null|\Stripe\StripeObject $ideal
* @property null|\Stripe\StripeObject $klarna
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|\Stripe\StripeObject $multibanco
* @property null|\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types.
* @property null|\Stripe\StripeObject $p24
* @property null|\Stripe\StripeObject $receiver
* @property null|\Stripe\StripeObject $redirect
* @property null|\Stripe\StripeObject $sepa_credit_transfer
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property null|\Stripe\StripeObject $source_order
* @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source.
* @property string $status The status of the source, one of canceled
, chargeable
, consumed
, failed
, or pending
. Only chargeable
sources can be used to create a charge.
* @property null|\Stripe\StripeObject $three_d_secure
* @property string $type The type
of the source. The type
is a payment method, one of ach_credit_transfer
, ach_debit
, alipay
, bancontact
, card
, card_present
, eps
, giropay
, ideal
, multibanco
, klarna
, p24
, sepa_debit
, sofort
, three_d_secure
, or wechat
. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
* @property null|string $usage Either reusable
or single_use
. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
* @property null|\Stripe\StripeObject $wechat
*/
class Source extends ApiResource
{
const OBJECT_NAME = 'source';
use ApiOperations\Update;
const FLOW_CODE_VERIFICATION = 'code_verification';
const FLOW_NONE = 'none';
const FLOW_RECEIVER = 'receiver';
const FLOW_REDIRECT = 'redirect';
const STATUS_CANCELED = 'canceled';
const STATUS_CHARGEABLE = 'chargeable';
const STATUS_CONSUMED = 'consumed';
const STATUS_FAILED = 'failed';
const STATUS_PENDING = 'pending';
const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer';
const TYPE_ACH_DEBIT = 'ach_debit';
const TYPE_ACSS_DEBIT = 'acss_debit';
const TYPE_ALIPAY = 'alipay';
const TYPE_AU_BECS_DEBIT = 'au_becs_debit';
const TYPE_BANCONTACT = 'bancontact';
const TYPE_CARD = 'card';
const TYPE_CARD_PRESENT = 'card_present';
const TYPE_EPS = 'eps';
const TYPE_GIROPAY = 'giropay';
const TYPE_IDEAL = 'ideal';
const TYPE_KLARNA = 'klarna';
const TYPE_MULTIBANCO = 'multibanco';
const TYPE_P24 = 'p24';
const TYPE_SEPA_CREDIT_TRANSFER = 'sepa_credit_transfer';
const TYPE_SEPA_DEBIT = 'sepa_debit';
const TYPE_SOFORT = 'sofort';
const TYPE_THREE_D_SECURE = 'three_d_secure';
const TYPE_WECHAT = 'wechat';
const USAGE_REUSABLE = 'reusable';
const USAGE_SINGLE_USE = 'single_use';
/**
* Creates a new source object.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Retrieves an existing source object. Supply the unique source ID from a source
* creation request and Stripe will return the corresponding up-to-date source
* object information.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the specified source by setting the values of the parameters passed. Any
* parameters not provided will be left unchanged.
*
* This request accepts the metadata
and owner
as
* arguments. It is also possible to update type specific information for selected
* payment methods. Please refer to our payment method
* guides for more detail.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
use ApiOperations\NestedResource;
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\UnexpectedValueException if the source is not attached to a customer
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source the detached source
*/
public function detach($params = null, $opts = null)
{
self::_validateParams($params);
$id = $this['id'];
if (!$id) {
$class = static::class;
$msg = "Could not determine which URL to request: {$class} instance "
. "has invalid ID: {$id}";
throw new Exception\UnexpectedValueException($msg, null);
}
if ($this['customer']) {
$base = Customer::classUrl();
$parentExtn = \urlencode(Util\Util::utf8($this['customer']));
$extn = \urlencode(Util\Util::utf8($id));
$url = "{$base}/{$parentExtn}/sources/{$extn}";
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
$message = 'This source object does not appear to be currently attached '
. 'to a customer object.';
throw new Exception\UnexpectedValueException($message);
}
/**
* @param string $id
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\SourceTransaction> list of source transactions
*/
public static function allSourceTransactions($id, $params = null, $opts = null)
{
$url = static::resourceUrl($id) . '/source_transactions';
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Source the verified source
*/
public function verify($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/verify';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
}