def process_callback(payment_transaction, callback_response)
      begin
        validate_callback payment_transaction, callback_response
      rescue Exception => error
        payment_transaction.add_error error
        payment_transaction.status = PaymentTransaction::STATUS_ERROR

        raise error
      end

      update_payment_transaction payment_transaction, callback_response

      if callback_response.error?
        raise callback_response.error
      end

      callback_response
    end
def process_callback(payment_transaction, callback_response)
      begin
        validate_callback payment_transaction, callback_response
      rescue Exception => error
        payment_transaction.add_error error
        payment_transaction.status = PaymentTransaction::STATUS_ERROR

        raise error
      end

      update_payment_transaction payment_transaction, callback_response

      if callback_response.error?
        raise callback_response.error
      end

      callback_response
    end
Process API gateway Response and update Payment transaction

 @param    payment_transaction   [PaymentTransaction]    Payment transaction for update
 @param    callback_response     [CallbackResponse]      PaynetEasy callback

 @return                         [CallbackResponse]      PaynetEasy callback