CodeIgniter Forums
paypal php sdk issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: paypal php sdk issue (/showthread.php?tid=73140)



paypal php sdk issue - scatman98 - 03-22-2019

im using this guide for integrating paypal gateway in a website

http://webeasystep.com/blog/view_article/paypal_payment_gateway_integration_in_codeigniter

the issue is here

line 195 of paypal.php in controller


Code:
/** Here Write your database logic like that insert record or value in database if you want **/
           $this->paypal->create($Total,$Subtotal,$Tax,$PaymentMethod,$PayerStatus,$PayerMail,$saleId,$CreateTime,$UpdateTime,$State);

code throws an error at this line

Code:
A PHP Error was encountered
Severity: Notice

Message: Undefined property: Paypal::$paypal

Filename: controllers/Paypal.php

Line Number: 195

Backtrace:

File: /opt/lampp/htdocs/new2/application/controllers/Paypal.php
Line: 195
Function: _error_handler

File: /opt/lampp/htdocs/new2/index.php
Line: 315
Function: require_once

An uncaught Exception was encountered
Type: Error

Message: Call to a member function create() on null

Filename: /opt/lampp/htdocs/new2/application/controllers/Paypal.php

Line Number: 195

Backtrace:

File: /opt/lampp/htdocs/new2/index.php
Line: 315
Function: require_once


probably because it can't enter this information into the database?

i have a table called payments with above variables set in mysql database called dbpaypal

how do i enter this information into that table? or otherwise how do i fix this error