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.


Messages In This Thread
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 11:05 AM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 11:32 AM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 11:48 AM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 11:59 AM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 12:09 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 12:34 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 01:04 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 01:10 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 01:17 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 01:29 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 02:15 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 02:27 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 03:15 PM
Paypal_Lib + Monthly Subscription - by El Forum - 07-22-2010, 06:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB