* @copyright 2007-2019 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include_once _PS_MODULE_DIR_.'paypal/classes/AbstractMethodPaypal.php'; /** * Update PPP payment request before initialize it. */ class PaypalPppPatchModuleFrontController extends ModuleFrontController { public function postProcess() { $method_ppp = AbstractMethodPaypal::load('PPP'); if (Context::getContext()->cookie->paypal_plus_payment) { try { $method_ppp->doPatch(); die(Tools::jsonEncode(array('success' => true))); } catch (Exception $e) { die($e->getMessage()); } } } }