PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / vendor / stripe / stripe-php / lib / Issuing / Authorization.php

Authorization.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/stripe/stripe-php/lib/Issuing/Authorization.php

83 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // File generated from our OpenAPI spec
4
5 namespace Stripe\Issuing;
6
7 /**
8 * When an <a href="https://stripe.com/docs/issuing">issued card</a> is used to
9 * make a purchase, an Issuing <code>Authorization</code> object is created. <a
10 * href="https://stripe.com/docs/issuing/purchases/authorizations">Authorizations</a>
11 * must be approved for the purchase to be completed successfully.
12 *
13 * Related guide: <a
14 * href="https://stripe.com/docs/issuing/purchases/authorizations">Issued Card
15 * Authorizations</a>.
16 *
17 * @property string $id Unique identifier for the object.
18 * @property string $object String representing the object's type. Objects of the same type share the same value.
19 * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
20 * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
21 * @property bool $approved Whether the authorization has been approved.
22 * @property string $authorization_method How the card details were provided.
23 * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
24 * @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders.
25 * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
26 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
27 * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
28 * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
29 * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
30 * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
31 * @property \Stripe\StripeObject $merchant_data
32 * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
33 * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook.
34 * @property \Stripe\StripeObject[] $request_history History of every time <code>pending_request</code> was approved/denied, either by you directly or by Stripe (e.g. based on your <code>spending_controls</code>). If the merchant changes the authorization by performing an <a href="https://stripe.com/docs/issuing/purchases/authorizations">incremental authorization</a>, you can look at this field to see the previous requests for the authorization.
35 * @property string $status The current status of the authorization in its lifecycle.
36 * @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization.
37 * @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this authorization if it was created on a <a href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount</a>.
38 * @property \Stripe\StripeObject $verification_data
39 * @property null|string $wallet The digital wallet used for this authorization. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>.
40 */
41 class Authorization extends \Stripe\ApiResource
42 {
43 const OBJECT_NAME = 'issuing.authorization';
44
45 use \Stripe\ApiOperations\All;
46 use \Stripe\ApiOperations\Retrieve;
47 use \Stripe\ApiOperations\Update;
48
49 /**
50 * @param null|array $params
51 * @param null|array|string $opts
52 *
53 * @throws \Stripe\Exception\ApiErrorException if the request fails
54 *
55 * @return \Stripe\Issuing\Authorization the approved authorization
56 */
57 public function approve($params = null, $opts = null)
58 {
59 $url = $this->instanceUrl() . '/approve';
60 list($response, $opts) = $this->_request('post', $url, $params, $opts);
61 $this->refreshFrom($response, $opts);
62
63 return $this;
64 }
65
66 /**
67 * @param null|array $params
68 * @param null|array|string $opts
69 *
70 * @throws \Stripe\Exception\ApiErrorException if the request fails
71 *
72 * @return \Stripe\Issuing\Authorization the declined authorization
73 */
74 public function decline($params = null, $opts = null)
75 {
76 $url = $this->instanceUrl() . '/decline';
77 list($response, $opts) = $this->_request('post', $url, $params, $opts);
78 $this->refreshFrom($response, $opts);
79
80 return $this;
81 }
82 }
83