Welcome Guest, Not a member yet? Register   Sign In
CI + (SERMEPA) spanish bank protocols FOR payment system
#1

[eluser]chefnelone[/eluser]
Hello,

I've been using SERMEPA which is a spanish bank protocols FOR payment system.

But now it's the firs time I'll do it using codeigniter.

Basically I need to have a file call: conexion_sis.php which sent a request to the bank system.

But I have some problem with these lines:


conexion_sis.php:
Code:
<?PHP
// If form is submitted with all required data then show the form
// else show error page
empty($Formulario) ?                            
      ShowForm($Ds_Merchant_Amount,$Ds_Merchant_Currency,$prod) :
      ShowError();
exit;
?>


I get these 3 error messages

Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: Ds_Merchant_Amount
Filename: views/conexion_sis.php
Line Number: 11

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: Ds_Merchant_Currency
Filename: views/conexion_sis.php
Line Number: 11

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: prod
Filename: views/conexion_sis.php
Line Number: 11

Line 11 is: ShowForm($Ds_Merchant_Amount,$Ds_Merchant_Currency ,$prod)

If I try the same file conexion_sis.php but NO usign CI library everything runs just fine

Should I change the lines which causes the ERRORS?
How can I solve this?

Thanks
#2

[eluser]Xoan SampaiƱo[/eluser]
You need to define $DS_Merchant_Amount, $DS_Merchant_Currency, and $prod as $data array() in your controller action and pass it then to the view:

Code:
// $DS_Merchant_* and $prod should be declared in this controller action
$data['DS_Merchant_Amount'] = $DS_Merchant_Amount;
$data['DS_Merchant_Currency'] = $DS_Merchant_Currency;
$data['prod'] = $prod;
$this->load->view('view', $data);




Theme © iAndrew 2016 - Forum software by © MyBB