Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

@@ -160,11 +160,11 @@ try
/* Normal */
else
{
$response = $transaction->method->api( "payments/payment/{$transaction->gw_id}/execute", array(
$response = $transaction->method->api( "checkout/orders/{$transaction->gw_id}/authorize", array(
'payer_id' => \IPS\Request::i()->PayerID,
) );
$transaction->gw_id = $response['transactions'][0]['related_resources'][0]['authorization']['id']; // Was previously a payment ID. This sets it to the actual transaction ID for the authorization. At capture, it will be updated again to the capture transaction ID
$transaction->auth = \IPS\DateTime::ts( strtotime( $response['transactions'][0]['related_resources'][0]['authorization']['valid_until'] ) );
), 'post', TRUE, NULL, NULL, 2 );
$transaction->gw_id = $response['purchase_units'][0]['payments']['authorizations'][0]['id']; // Was previously a payment ID. This sets it to the actual transaction ID for the authorization. At capture, it will be updated again to the capture transaction ID
$transaction->auth = \IPS\DateTime::ts( strtotime( $response['purchase_units'][0]['payments']['authorizations'][0]['expiration_time'] ) );
if ( isset( $response['payer'] ) and isset( $response['payer']['status'] ) )
{
$extra = $transaction->extra;
@@ -198,6 +198,7 @@ try
}
catch ( \Exception $e )
{
$transaction->method->processException( $transaction, $e );
\IPS\Log::log( $e, 'paypal' );
\IPS\Output::i()->redirect( $transaction->invoice->checkoutUrl()->setQueryString( array( '_step' => 'checkout_pay', 'err' => $e->getMessage() ) ) );
}
@@ -331,10 +331,10 @@ class stripeWebhookHandler
if ( \substr( $this->transaction->gw_id, 0, 3 ) === 'pi_' )
{
$paymentIntent = $this->transaction->method->api( 'payment_intents/' . $this->transaction->gw_id, null, 'get' );
$paymentIntent = $this->transaction->method->api( 'charges?payment_intent=' . $this->transaction->gw_id, null, 'get' );
$ok = FALSE;
foreach ( $paymentIntent['charges']['data'] as $charge )
foreach ( $paymentIntent['data'] as $charge )
{
if ( $dispute['charge'] === $charge['id'] )
{
@@ -398,10 +398,10 @@ class stripeWebhookHandler
$dispute = $this->transaction->method->api( 'disputes/' . preg_replace( '/[^A-Z0-9_]/i', '', $this->data['data']['object']['id'] ) );
if ( \substr( $this->transaction->gw_id, 0, 3 ) === 'pi_' )
{
$paymentIntent = $this->transaction->method->api( 'payment_intents/' . $this->transaction->gw_id, null, 'get' );
$paymentIntent = $this->transaction->method->api( 'charges?payment_intent=' . $this->transaction->gw_id, null, 'get' );
$ok = FALSE;
foreach ( $paymentIntent['charges']['data'] as $charge )
foreach ( $paymentIntent['data'] as $charge )
{
if ( $dispute['charge'] === $charge['id'] )
{
Whitespace-only changes.
@@ -1,56 +0,0 @@
<?php
/**
* @brief Monitoring Respond
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 07 Aug 2014
*/
\define('REPORT_EXCEPTIONS', TRUE);
require_once '../../../../init.php';
\IPS\Dispatcher\External::i();
\IPS\Output::i()->pageCaching = FALSE;
try
{
$server = \IPS\nexus\Hosting\Server::load( \IPS\Request::i()->server );
}
catch ( \OutOfRangeException $e )
{
\IPS\Output::i()->error( 'node_error', '2X230/1', 404, '' );
}
if ( !$server->monitor_fails )
{
\IPS\Output::i()->error( 'monitor_respond_err_online', '1X230/2', 403, '' );
}
if ( \IPS\Request::i()->a === 'a' )
{
if ( $server->monitor_acknowledged )
{
\IPS\Output::i()->error( 'monitor_respond_err_acknowledged', '1X230/3', 403, '' );
}
else
{
$server->monitor_acknowledged = TRUE;
$server->save();
$server->monitoringAcknowledged( \IPS\Request::i()->by );
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->blankTemplate( \IPS\Theme::i()->getTemplate( 'hosting', 'nexus', 'front' )->monitorRespond( 'monitor_respond_acknowleged' ) ), 200, 'text/html' );
}
}
elseif ( \IPS\Request::i()->a === 'r' )
{
$server->monitor_fails = 0;
$server->monitor_acknowledged = 0;
$server->save();
$server->monitoringReset( \IPS\Request::i()->by );
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->blankTemplate( \IPS\Theme::i()->getTemplate( 'hosting', 'nexus', 'front' )->monitorRespond( 'monitor_respond_reset' ) ), 200, 'text/html' );
}