Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Error persisting an order status change when Paypal Checkout is installed

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-10-2021, 11:24 AM
 
relunacmx relunacmx is offline
    
Join Date: Sep 2021
Posts: 1
 

Default Error persisting an order status change when Paypal Checkout is installed

Hi,

I created a small script that receives an order transaction ID and must change the order status to PAID.
require_once 'top.inc.php';

$tran_id = $_POST['transaction_id'];

$tran = \XLite\Core\Database::getRepo('\XLite\Model\Paymen t\Transaction')->findOneByPublicTxnId($tran_id);

$tran->setStatus($tran::STATUS_SUCCESS);
$tran->registerTransactionInOrderHistory();

$ord = $tran->getOrder();
$ord->setPaymentStatusByTransaction($tran);

\XLite\Core\Database::getEM()->persist($ord);
\XLite\Core\Database::getEM()->flush();
This was working fine until we installed the Paypal Checkout payment method. If the Paypal Checkout method is active, we get the following error in the last line of our code (marked red):

Class 'PayPalCheckoutSdk\Core\PayPalHttpClient' not found


The transaction gets updated to SUCCESS fine, but the error when calling the flush() function prevents the order from being updated to PAID.

The order we are updating doesn't use the Paypal Chekout at all, it has nothing to do with Paypal.


Best Regards,
Rafael Luna
__________________
X-Cart 5.4.1.31
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:24 AM.

   

 
X-Cart forums © 2001-2020