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() ) ) );
}