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: PaymentLink.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
* A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
[6] Fix | Delete
*
[7] Fix | Delete
* When a customer opens a payment link it will open a new <a href="https://stripe.com/docs/api/checkout/sessions">checkout session</a> to render the payment page. You can use <a href="https://stripe.com/docs/api/events/types#event_types-checkout.session.completed">checkout session events</a> to track payments through payment links.
[8] Fix | Delete
*
[9] Fix | Delete
* Related guide: <a href="https://stripe.com/docs/payment-links">Payment Links API</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 bool $active Whether the payment link's <code>url</code> is active. If <code>false</code>, customers visiting the URL will be shown a page saying that the link has been deactivated.
[14] Fix | Delete
* @property \Stripe\StripeObject $after_completion
[15] Fix | Delete
* @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled.
[16] Fix | Delete
* @property null|string|\Stripe\Application $application The ID of the Connect application that created the Payment Link.
[17] Fix | Delete
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
[18] Fix | Delete
* @property null|float $application_fee_percent This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
[19] Fix | Delete
* @property \Stripe\StripeObject $automatic_tax
[20] Fix | Delete
* @property string $billing_address_collection Configuration for collecting the customer's billing address. Defaults to <code>auto</code>.
[21] Fix | Delete
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration to gather active consent from customers.
[22] 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>.
[23] Fix | Delete
* @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 3 fields are supported.
[24] Fix | Delete
* @property \Stripe\StripeObject $custom_text
[25] Fix | Delete
* @property string $customer_creation Configuration for Customer creation during checkout.
[26] Fix | Delete
* @property null|string $inactive_message The custom message to be displayed to a customer when a payment link is no longer active.
[27] Fix | Delete
* @property null|\Stripe\StripeObject $invoice_creation Configuration for creating invoice for payment mode payment links.
[28] Fix | Delete
* @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
[29] Fix | Delete
* @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.
[30] Fix | Delete
* @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.
[31] Fix | Delete
* @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the <a href="https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts">Connect documentation</a> for details.
[32] Fix | Delete
* @property null|\Stripe\StripeObject $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
[33] Fix | Delete
* @property string $payment_method_collection Configuration for collecting a payment method during checkout. Defaults to <code>always</code>.
[34] Fix | Delete
* @property null|string[] $payment_method_types The list of payment method types that customers can use. When <code>null</code>, Stripe will dynamically show relevant payment methods you've enabled in your <a href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
[35] Fix | Delete
* @property \Stripe\StripeObject $phone_number_collection
[36] Fix | Delete
* @property null|\Stripe\StripeObject $restrictions Settings that restrict the usage of a payment link.
[37] Fix | Delete
* @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address.
[38] Fix | Delete
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session.
[39] Fix | Delete
* @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
[40] Fix | Delete
* @property null|\Stripe\StripeObject $subscription_data When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use <code>subscription_data</code>.
[41] Fix | Delete
* @property \Stripe\StripeObject $tax_id_collection
[42] Fix | Delete
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
[43] Fix | Delete
* @property string $url The public URL that can be shared with customers.
[44] Fix | Delete
*/
[45] Fix | Delete
class PaymentLink extends ApiResource
[46] Fix | Delete
{
[47] Fix | Delete
const OBJECT_NAME = 'payment_link';
[48] Fix | Delete
use ApiOperations\All;
[49] Fix | Delete
use ApiOperations\Create;
[50] Fix | Delete
use ApiOperations\Retrieve;
[51] Fix | Delete
use ApiOperations\Update;
[52] Fix | Delete
const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
[53] Fix | Delete
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
[54] Fix | Delete
const CUSTOMER_CREATION_ALWAYS = 'always';
[55] Fix | Delete
const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
[56] Fix | Delete
const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always';
[57] Fix | Delete
const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required';
[58] Fix | Delete
const SUBMIT_TYPE_AUTO = 'auto';
[59] Fix | Delete
const SUBMIT_TYPE_BOOK = 'book';
[60] Fix | Delete
const SUBMIT_TYPE_DONATE = 'donate';
[61] Fix | Delete
const SUBMIT_TYPE_PAY = 'pay';
[62] Fix | Delete
/**
[63] Fix | Delete
* @param string $id
[64] Fix | Delete
* @param null|array $params
[65] Fix | Delete
* @param null|array|string $opts
[66] Fix | Delete
*
[67] Fix | Delete
* @throws \Stripe\Exception\ApiErrorException if the request fails
[68] Fix | Delete
*
[69] Fix | Delete
* @return \Stripe\Collection<\Stripe\LineItem> list of line items
[70] Fix | Delete
*/
[71] Fix | Delete
public static function allLineItems($id, $params = null, $opts = null)
[72] Fix | Delete
{
[73] Fix | Delete
$url = static::resourceUrl($id) . '/line_items';
[74] Fix | Delete
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
[75] Fix | Delete
$obj = \WPForms\Vendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
[76] Fix | Delete
$obj->setLastResponse($response);
[77] Fix | Delete
return $obj;
[78] Fix | Delete
}
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function