|
|||||||
| PHP Discussion and technical support for using and deploying PHP based websites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Parse error: syntax error, unexpected T_EXIT
I'm getting the following error:
Parse error: syntax error, unexpected T_EXIT in /home/snh/public_html/AHYRadio/amember/plugins/payment/1shoppingcart/1shoppingcart.inc.php on line 1 Here is what I have - the copying and pasting messed up the formatting - sorry! It was working fine, but I was told I could edit the line var $title = "1ShoppingCart" to whatever I wanted. I changed it to "Pay with Credit Card" and then I started getting this error. Any help would be greately appreciated!! <?phpif (!defined('INCLUDED_AMEMBER_CONFIG')) die("Direct access to this location is not allowed");/**** Author: Alex Scott* Email: alex@cgi-central.net* Web: http://www.cgi-central.net* Details: 1ShoppingCart Payment Plugin* FileName $RCSfile: paypal_r.inc.php,v $* Release: 3.0.9PRO ($Revision: 1.8 $)** Please direct bug reports,suggestions or feedback to the cgi-central forums.* http://www.cgi-central.net/forum/** aMember PRO is a commercial software. Any distribution is strictly prohibited.*/class payment_1shoppingcart extends amember_payment { var $title = "1ShoppingCart"; var $description = "All major credit cards accepted"; var $fixed_price=1; var $recurring=1; var $built_in_trials=1; function do_bill($amount, $title, $products, $u, $invoice){ global $config; $_SESSION['_amember_payment_id'] = $invoice; $vars = array( 'MerchantID' => $this->config['merchant_id'], 'ProductID' => $products[0]['1shoppingcart_id'], 'AMemberID' => $invoice, 'PostBackURL' => $config['root_url'] . "/plugins/payment/1shoppingcart/ipn.php", ); |
|
#2
|
||||
|
||||
|
If you use this forum's PHP bbcode tags around your code sample, it will save everyone a lot of grief.
Anyway, you're missing the closing curly braces for the class method (function) as well as the class itself. Also, you have a comma at the end of the last element in the $vars array declaration, which is a no-no. PHP Code:
__________________
"That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett freelancer.internet.com Email me |
|
#3
|
|||
|
|||
|
Fatal error: No parent class available
Thanks for your help and being understanding - this is really new to me! I'm sure this was completely my fault since I didn't copy and paste the entire code over, but now I am getting:
Fatal error: No parent class available in /home/snh/public_html/AHYRadio/amember/plugins/payment/1shoppingcart/1shoppingcart.inc.php on line 133 Here is the code - again, any help is greately appreciated! By the way - I tried to format it better this time - I hit enter every time there was a break, so hopefully this is set up right- thanks again. PHP Code:
|
|
#4
|
||||
|
||||
|
This line...
PHP Code:
__________________
"That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett freelancer.internet.com Email me |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|