Welcome Guest, Not a member yet? Register   Sign In
Paypal_Lib + Monthly Subscription
#11

[eluser]bondjp[/eluser]
[quote author="pickupman" date="1279844968"]1.In order to use output compression you need to change the echos'. Add each line to a string, and pass that off to a view.
Code:
$data['form'] = '<html>' ."\n";
$data['form'] .= '<head>'; //..rest

$this->load->view('paypal_form', $data);

//paypal_form view
echo $form;

2. In order to use the log, enable the option in config/paypallib_config.php. Make sure the file exists and has write permissions (0777). I edited the code and created a paypal_log table. Then I just insert the log details into the table. I can view in my dashboard that way. Lazy opening files I guess.[/quote]


Hmmm, just did that but i'm getting this error:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Paypal_Lib::$load

Filename: libraries/Paypal_lib.php

Line Number: 185

Fatal error: Call to a member function view() on a non-object in /home/availabl/public_html/app/libraries/Paypal_lib.php on line 185

in this line :
Code:
$this->load->view('paypal/paypal_form', $data);

here's the complete code. Remember i'm using the auto_form:
Code:
function paypal_auto_form()
    {
        // this function actually generates an entire HTML page consisting of
        // a form with hidden elements which is submitted to paypal via the
        // BODY element's onLoad attribute.  We do this so that you can validate
        // any POST vars from you custom form before submitting to paypal.  So
        // basically, you'll have your own form which is submitted to your script
        // to validate the data, which in turn calls this function to create
        // another hidden form and submit to paypal.

        $this->button('Click here if you\'re not automatically redirected...');
        $data['form'] = '<html>' ."\n";
        $data['form'] = '<head><title>Processing Payment...</title></head>' . "\n";
        $data['form'] = '<body>' . "\n";
        $data['form'] = '<p>Please wait, your order is being processed and you will be redirected to the paypal website.</p>' . "\n";
        $data['form'] = $this->paypal_form('paypal_auto_form');
        $data['form'] = '&lt;/body&gt;&lt;/html>';
        $this->load->view('paypal/paypal_form', $data);
    }


2- Changed the attributes and still get an empty file. Just don't know where the error is.
The config is set to TRUE.
#12

[eluser]pickupman[/eluser]
When appending data to a string you would use .= not = and this error could be fixed with changing $this->load to $CI. I hadn't realized you were using the code from the library.
#13

[eluser]bondjp[/eluser]
Thanks a LOT!!!
Really appreciate the time you took with me.
Thanks.
#14

[eluser]pickupman[/eluser]
Glad you got on the right track.




Theme © iAndrew 2016 - Forum software by © MyBB