Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'virtualmerchant' :
- global $wpcoDb, $Order;
- $success = false;
- if (!empty($_POST)) {
- if ($_POST['ssl_result'] == 0) {
- if (!empty($_POST['ssl_invoice_number'])) {
- $order_id = $_POST['ssl_invoice_number'];
- $wpcoDb -> model = $Order -> model;
- if ($order = $wpcoDb -> find(array('id' => $order_id))) {
- if ($Order -> total($order_id, true, true, true, true, false) == $_POST['ssl_amount']) {
- $success = true;
- $order -> pmethod = $pmethod = "virtualmerchant";
- $user_id = $order -> user_id;
- }
- }
- }
- } else {
- $message = __('Transaction was not approved, please try again', $this -> plugin_name);
- }
- } else {
- $message = __('No data was posted back from the payment gateway', $this -> plugin_name);
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment