osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Paypal WPP conflicting with PWA?

This is a discussion on Paypal WPP conflicting with PWA? within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; For some reason, after installing paypal's website payments pro contrib, users can no longer create accounts. instead i get ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 03-20-2007, 10:42 AM
New Member
 
Join Date: Feb 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
liquidhal is on a distinguished road
Default Paypal WPP conflicting with PWA?

For some reason, after installing paypal's website payments pro contrib, users can no longer create accounts. instead i get the message, "Parse error: syntax error, unexpected $end in /home/rlspecia/public_html/create_account.php on line 394"

394 being the last line of the file.

I have very limited php skills, so I simply added the paypal bit in the appropriate place, but it's immediately followed by a pay without account segment of code that looks similar, could they be conflicting?


PHP Code:
//---PayPal WPP Modification START ---//    
      //$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
      
$check_email_query tep_db_query("select customers_id as id, customers_paypal_ec as ec from " TABLE_CUSTOMERS " where customers_email_address = '" tep_db_input($email_address) . "'");
      if (
tep_db_num_rows($check_email_query) > 0) {
        
$check_email tep_db_fetch_array($check_email_query);
        if (
$check_email['ec'] == '1') {
          
//It's a temp account, so delete it and let the user create a new one
          
tep_db_query("delete from " TABLE_ADDRESS_BOOK " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_INFO " where customers_info_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET_ATTRIBUTES " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_WHOS_ONLINE " where customer_id = '" . (int)$check_email['id'] . "'");
        } else {
          
$error true;

          
$messageStack->add('create_account'ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        }
//---PayPal WPP Modification END---//    
      
$check_email_query tep_db_query("select count(*) as total from " TABLE_CUSTOMERS " where customers_email_address = '" tep_db_input($email_address) . "'");
      
$check_email tep_db_fetch_array($check_email_query);
// BOF: MOD - PWA
//      if ($check_email['total'] > 0) {
//        $error = true;
//        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
      
if ($check_email['total'] > 0) {
//PWA delete account
        
$get_customer_info tep_db_query("select customers_id, customers_email_address, purchased_without_account from " TABLE_CUSTOMERS " where customers_email_address = '" tep_db_input($email_address) . "'");
        
$customer_info tep_db_fetch_array($get_customer_info); 
        
$customer_id $customer_info['customers_id']; 
        
$customer_email_address $customer_info['customers_email_address']; 
        
$customer_pwa $customer_info['purchased_without_account']; 
        if (
$customer_pwa !='1') {
           
$error true;

           
$messageStack->add('create_account'ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        } else {   
          
tep_db_query("delete from " TABLE_ADDRESS_BOOK " where customers_id = '" $customer_id "'");   
          
tep_db_query("delete from " TABLE_CUSTOMERS " where customers_id = '" $customer_id "'");   
          
tep_db_query("delete from " TABLE_CUSTOMERS_INFO " where customers_info_id = '" $customer_id "'");   
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET " where customers_id = '" $customer_id "'");   
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET_ATTRIBUTES " where customers_id = '" $customer_id "'");   
          
tep_db_query("delete from " TABLE_WHOS_ONLINE " where customer_id = '" $customer_id "'"); 
        }  
// EOF: MOD - PWA 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 03-20-2007, 07:10 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,521
Thanks: 1
Thanked 81 Times in 68 Posts
Rep Power: 10
jpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nice
Default Re: Paypal WPP conflicting with PWA?

Yep - look at the duplicate code.
Code:
 $check_email = tep_db_fetch_array($check_email_query);
Code:
        if ($check_email['.......'] == '1') {
Code:
          tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_email['id'] . "'");
          tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$check_email['id'] . "'");
          tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$check_email['id'] . "'");
          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$check_email['id'] . "'");
          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$check_email['id'] . "'");
          tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$check_email['id'] . "'");
Code:
          $error = true;
Code:
          $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

Re-read the instructions. Did it said to insert or replace:

Code:
      if ($check_email['total'] > 0) {
        $error = true;
        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
....
This is the code that PWA changed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 03-20-2007, 09:22 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,521
Thanks: 1
Thanked 81 Times in 68 Posts
Rep Power: 10
jpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nice
Default Re: Paypal WPP conflicting with PWA?

Try this:

PHP Code:
      $messageStack->add('create_account'ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    } else {

//---PayPal WPP Modification START ---//    
      //$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
      
$check_email_query tep_db_query("select customers_id as id, customers_paypal_ec as ec from " TABLE_CUSTOMERS " where customers_email_address = '" tep_db_input($email_address) . "'");
      if (
tep_db_num_rows($check_email_query) > 0) {
        
$check_email tep_db_fetch_array($check_email_query);
//      if ($check_email['total'] > 0) {
//        $error = true;
//        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        
if ($check_email['ec'] == '1') {
          
//It's a temp account, so delete it and let the user create a new one
          
tep_db_query("delete from " TABLE_ADDRESS_BOOK " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_INFO " where customers_info_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET_ATTRIBUTES " where customers_id = '" . (int)$check_email['id'] . "'");
          
tep_db_query("delete from " TABLE_WHOS_ONLINE " where customer_id = '" . (int)$check_email['id'] . "'");
        } else {
// BOF: MOD - PWA
          
if ($check_email['total'] > 0) {
//PWA delete account
            
$get_customer_info tep_db_query("select customers_id, customers_email_address, purchased_without_account from " TABLE_CUSTOMERS " where customers_email_address = '" tep_db_input($email_address) . "'");
            
$customer_info tep_db_fetch_array($get_customer_info); 
            
$customer_id $customer_info['customers_id']; 
            
$customer_email_address $customer_info['customers_email_address']; 
            
$customer_pwa $customer_info['purchased_without_account']; 
            if (
$customer_pwa !='1') {
               
$error true;

               
$messageStack->add('create_account'ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
            } else {   
              
tep_db_query("delete from " TABLE_ADDRESS_BOOK " where customers_id = '" $customer_id "'");   
              
tep_db_query("delete from " TABLE_CUSTOMERS " where customers_id = '" $customer_id "'");   
              
tep_db_query("delete from " TABLE_CUSTOMERS_INFO " where customers_info_id = '" $customer_id "'");   
              
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET " where customers_id = '" $customer_id "'");   
              
tep_db_query("delete from " TABLE_CUSTOMERS_BASKET_ATTRIBUTES " where customers_id = '" $customer_id "'");   
              
tep_db_query("delete from " TABLE_WHOS_ONLINE " where customer_id = '" $customer_id "'"); 
            }  
          }  
        }  
//---PayPal WPP Modification END---//    
// EOF: MOD - PWA
      
}
    }

    if (
strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
      
$error true
Not tested but should be close.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 03-20-2007, 09:31 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,521
Thanks: 1
Thanked 81 Times in 68 Posts
Rep Power: 10
jpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nice
Default Re: Paypal WPP conflicting with PWA?

FYI a complete package of:

PayPal Website Payments Pro

This module implements PayPal Website Payments Pro which consists of PayPal's Express Checkout and Direct Payment methods. Since it over-writes several checkout files, it is likely to be incompatible with any modifications you have made to your checkout process or any other contributions that modify the checkout process. We hope to enhance it in the future so that it can be installed along side other checkout modifications.

This module does not use the PayPal PHP SDK so the installation is fairly easy.



This has not be fully tested - this is a port to BTS and is OSCMAX compatible - the only file that may need tweaking is the above file. Anyone who use PAYPAL please test with PWA and report back.
Attached Files
File Type: zip paypal_us_oscmax.zip (386.7 KB, 16 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to jpf For This Useful Post:
michael_s (03-21-2007)
  #5  
Old 11-21-2007, 03:20 PM
New Member
 
Join Date: Nov 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
telder is on a distinguished road
Default Re: Paypal WPP conflicting with PWA?

I installed this mod and everything works up until the point where it reaches the checkout_process.php page. Once it hits this page I am given a blank screen. If someone clicks on the link to do an express payment it also sends them to a blank page via ex_process.php. Has anyone ran into this before and if so what was done to fix it?

Last edited by telder; 11-21-2007 at 07:55 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-23-2007, 11:04 AM
New Member
 
Join Date: Nov 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
telder is on a distinguished road
Default Re: Paypal WPP conflicting with PWA?

Does anyone have ANY thoughts on this??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 11-25-2007, 04:01 PM
New Member
 
Join Date: Nov 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
telder is on a distinguished road
Default Re: Paypal WPP conflicting with PWA?

There has to be someone that has implemented this and knows how to resolve the issues that have cropped up. IF I can't get this resolved within the next few days I'll have to move on to a solution that actually works.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
PayPal IPN in RC3 - values not being passed to PayPal? SavageSinister osCMax v2 Installation issues 3 02-12-2007 03:57 PM
conflicting Text Characters html and php anthon osCommerce 2.2 Installation Help 4 11-11-2004 10:35 PM
paypal and paypal IPN, whats the diff? lhotch osCommerce 2.2 Installation Help 1 09-06-2003 06:34 PM


All times are GMT -8. The time now is 10:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax