<?php $status = CcavenuePayment::processPayment(); // GET TX ID $tx = Params::getParam('Order_Id'); if ($status == PAYMENT_PRO_COMPLETED) { osc_add_flash_ok_message(__('Payment processed correctly', 'payment_pro')); } else { if ($status == PAYMENT_PRO_PENDING) { osc_add_flash_info_message(__('We are processing your payment, if we did not finish in a few seconds, please contact us', 'payment_pro')); } else { osc_add_flash_error_message(sprintf(__('Something failed! Please write down this transaction ID and contact us: %s', 'payment_pro'), $tx)); } } payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => $tx)));
public static function ajaxPayment() { $status = AuthorizePayment::processPayment(); if ($status == PAYMENT_PRO_COMPLETED) { payment_pro_cart_drop(); osc_add_flash_ok_message(sprintf(__('Success! Please write down this transaction ID in case you have any problem: %s', 'payment_pro'), Params::getParam('braintree_transaction_id'))); payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => Params::getParam('braintree_transaction_id')))); } else { if ($status == PAYMENT_PRO_ALREADY_PAID) { payment_pro_cart_drop(); osc_add_flash_warning_message(__('Warning! This payment was already paid', 'payment_pro')); payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => Params::getParam('authorize_transaction_id')))); } else { printf(__('There were an error processing your payment: %s', 'payment_pro'), Params::getParam('authorize_error')); } } }
<?php $id = Params::getParam('id'); payment_pro_cart_drop($id); // IF removed publish fee, remove too the premium fee so a user is not able to pay just the premium but not the publish fee if (substr($id, 0, 3) == 'PUB') { payment_pro_cart_drop('PRM' . substr($id, 3)); } payment_pro_js_redirect_to(osc_route_url('payment-pro-checkout'));