installed plugin Easy Digital Downloads version 3.1.0.3

This commit is contained in:
2022-11-27 15:03:07 +00:00
committed by Gitium
parent 555673545b
commit c5dce2cec6
1200 changed files with 238970 additions and 0 deletions

View File

@ -0,0 +1,17 @@
<?php
/**
* API Exception
*
* Thrown when an API request has failed.
*
* @package easy-digital-downloads
* @copyright Copyright (c) 2021, Sandhills Development, LLC
* @license GPL2+
* @since 2.11
*/
namespace EDD\Gateways\PayPal\Exceptions;
class API_Exception extends \Exception {
}

View File

@ -0,0 +1,17 @@
<?php
/**
* Authentication Exception
*
* Will be thrown if PayPal API credentials are missing or invalid.
*
* @package easy-digital-downloads
* @copyright Copyright (c) 2021, Sandhills Development, LLC
* @license GPL2+
* @since 2.11
*/
namespace EDD\Gateways\PayPal\Exceptions;
class Authentication_Exception extends \Exception {
}

View File

@ -0,0 +1,59 @@
<?php
/**
* PayPal Gateway Exception
*
* @package easy-digital-downloads
* @copyright Copyright (c) 2021, Sandhills Development, LLC
* @license GPL2+
* @since 2.11
*/
namespace EDD\Gateways\PayPal\Exceptions;
class Gateway_Exception extends \Exception {
/**
* More specific message, used for recording gateway errors.
*
* @var string
*/
private $debug_message;
/**
* Gateway_Exception constructor.
*
* @param string $message Exception message. This might be vague, as it's usually presented to the end user.
* @param int $code Error code.
* @param string $debug_message More detailed debug message, used when recording gateway errors.
*
* @since 2.11
*/
public function __construct( $message = '', $code = 0, $debug_message = '' ) {
$this->debug_message = $debug_message;
parent::__construct( $message, $code );
}
/**
* Records a gateway error based off this exception.
*
* @param int $payment_id
*
* @since 2.11
*/
public function record_gateway_error( $payment_id = 0 ) {
$message = ! empty( $this->debug_message ) ? $this->debug_message : $this->getMessage();
edd_record_gateway_error(
__( 'PayPal Gateway Error', 'easy-digital-downloads' ),
sprintf(
/* Translators: %d - HTTP response code; %s - Error message */
__( 'Response Code: %d; Message: %s', 'easy-digital-downloads' ),
$this->getCode(),
$message
),
$payment_id
);
}
}

View File

@ -0,0 +1,15 @@
<?php
/**
* Thrown if merchant details are supplied, but invalid.
*
* @package easy-digital-downloads
* @copyright Copyright (c) 2021, Sandhills Development, LLC
* @license GPL2+
* @since 2.11
*/
namespace EDD\Gateways\PayPal\Exceptions;
class InvalidMerchantDetails extends \InvalidArgumentException {
}

View File

@ -0,0 +1,17 @@
<?php
/**
* Thrown if there are no merchant details at all
*
* @see \EDD\Gateways\PayPal\MerchantAccount
*
* @package easy-digital-downloads
* @copyright Copyright (c) 2021, Sandhills Development, LLC
* @license GPL2+
* @since 2.11
*/
namespace EDD\Gateways\PayPal\Exceptions;
class MissingMerchantDetails extends \Exception {
}