Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wpforms-.../vendor_p.../stripe/stripe-p.../lib
File: Refund.php
<?php
[0] Fix | Delete
[1] Fix | Delete
// File generated from our OpenAPI spec
[2] Fix | Delete
namespace WPForms\Vendor\Stripe;
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Refund objects allow you to refund a previously created charge that isn't
[6] Fix | Delete
* refunded yet. Funds are refunded to the credit or debit card that's
[7] Fix | Delete
* initially charged.
[8] Fix | Delete
*
[9] Fix | Delete
* Related guide: <a href="https://stripe.com/docs/refunds">Refunds</a>
[10] Fix | Delete
*
[11] Fix | Delete
* @property string $id Unique identifier for the object.
[12] Fix | Delete
* @property string $object String representing the object's type. Objects of the same type share the same value.
[13] Fix | Delete
* @property int $amount Amount, in cents (or local equivalent).
[14] Fix | Delete
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
[15] Fix | Delete
* @property null|string|\Stripe\Charge $charge ID of the charge that's refunded.
[16] Fix | Delete
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
[17] Fix | Delete
* @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>.
[18] Fix | Delete
* @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
[19] Fix | Delete
* @property null|\Stripe\StripeObject $destination_details
[20] Fix | Delete
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
[21] Fix | Delete
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: <code>lost_or_stolen_card</code>, <code>expired_or_canceled_card</code>, <code>charge_for_pending_refund_disputed</code>, <code>insufficient_funds</code>, <code>declined</code>, <code>merchant_request</code>, or <code>unknown</code>.
[22] Fix | Delete
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
[23] Fix | Delete
* @property null|\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.
[24] Fix | Delete
* @property null|\Stripe\StripeObject $next_action
[25] Fix | Delete
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's refunded.
[26] Fix | Delete
* @property null|string $reason Reason for the refund, which is either user-provided (<code>duplicate</code>, <code>fraudulent</code>, or <code>requested_by_customer</code>) or generated by Stripe internally (<code>expired_uncaptured_charge</code>).
[27] Fix | Delete
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
[28] Fix | Delete
* @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.
[29] Fix | Delete
* @property null|string $status Status of the refund. This can be <code>pending</code>, <code>requires_action</code>, <code>succeeded</code>, <code>failed</code>, or <code>canceled</code>. Learn more about <a href="https://stripe.com/docs/refunds#failed-refunds">failed refunds</a>.
[30] Fix | Delete
* @property null|string|\Stripe\TransferReversal $transfer_reversal This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.
[31] Fix | Delete
*/
[32] Fix | Delete
class Refund extends ApiResource
[33] Fix | Delete
{
[34] Fix | Delete
const OBJECT_NAME = 'refund';
[35] Fix | Delete
use ApiOperations\All;
[36] Fix | Delete
use ApiOperations\Create;
[37] Fix | Delete
use ApiOperations\Retrieve;
[38] Fix | Delete
use ApiOperations\Update;
[39] Fix | Delete
const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card';
[40] Fix | Delete
const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
[41] Fix | Delete
const FAILURE_REASON_UNKNOWN = 'unknown';
[42] Fix | Delete
const REASON_DUPLICATE = 'duplicate';
[43] Fix | Delete
const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge';
[44] Fix | Delete
const REASON_FRAUDULENT = 'fraudulent';
[45] Fix | Delete
const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
[46] Fix | Delete
const STATUS_CANCELED = 'canceled';
[47] Fix | Delete
const STATUS_FAILED = 'failed';
[48] Fix | Delete
const STATUS_PENDING = 'pending';
[49] Fix | Delete
const STATUS_REQUIRES_ACTION = 'requires_action';
[50] Fix | Delete
const STATUS_SUCCEEDED = 'succeeded';
[51] Fix | Delete
/**
[52] Fix | Delete
* @param null|array $params
[53] Fix | Delete
* @param null|array|string $opts
[54] Fix | Delete
*
[55] Fix | Delete
* @throws \Stripe\Exception\ApiErrorException if the request fails
[56] Fix | Delete
*
[57] Fix | Delete
* @return \Stripe\Refund the canceled refund
[58] Fix | Delete
*/
[59] Fix | Delete
public function cancel($params = null, $opts = null)
[60] Fix | Delete
{
[61] Fix | Delete
$url = $this->instanceUrl() . '/cancel';
[62] Fix | Delete
list($response, $opts) = $this->_request('post', $url, $params, $opts);
[63] Fix | Delete
$this->refreshFrom($response, $opts);
[64] Fix | Delete
return $this;
[65] Fix | Delete
}
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function