CMS MADE SIMPLE FORGE

PaypalGateway

 

[#4306] A required parameter was missing

avatar
Created By: Sofia Hauschildt (sonya)
Date Submitted: Fri Nov 13 08:34:58 -0500 2009

Assigned To:
Version: 2.1.3
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
A required parameter was missing
Detailed Description:
The error in the summary occurs after redirection from PayPal. The parameter
$datakey is empty.

The reason for it is the function FinishTransaction() in the file
PaypalGateway.module.php

This function calls SaveState() from the same file. If the parameter $encrypt is
not set, then no datakey is saved:

---------------------------------------------------
  function SaveState($encrypt = false)
  {
    if( $encrypt )
      {
	$key = str_shuffle(md5(session_id().time()));
	$raw = serialize($this->_data);
	$enc = $this->encrypt($key,$raw);
	$_SESSION['paypalgw'] = base64_encode($enc);
	return $key;
      }
    else
      {
	$raw = serialize($this->_data);
	$_SESSION['paypalgw'] = base64_encode($raw);
	return '';  <--------------------------------- returns nothing
      }
  }
---------------------------------------

Line 550: 
$key = $this->SaveState();
should be
$key = $this->SaveState(true);


History

Updates

Updated: 2009-11-13 09:33
description: The error in the summary occurs after redirection from PayPal. The parameter $datakey is empty. The reason for it is the function FinishTransaction() in the file PaypalGateway.module.php This function calls SaveState() from the same file. If the par => The error in the summary occurs after redirection from PayPal. The parameter $datakey is empty. The reason for it is the function FinishTransaction() in the file PaypalGateway.module.php This function calls SaveState() from the same file. If the par
resolution_id: => 5