Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

I am having some issues getting this module to work. By no means am I a programmer, so please bear with me. I have installed the module given the instructions provided (word for word). After the installation, I try to run a transaction on either the Express Checkout mod or just a standard CC transaction. If I click the express checkout button, my page turns blank and has a link of "http://mysite.com/catalog/ec_process.php?osCsid=f20fa188105bd43c6f9f414e6f9c10af", and proceeds no further. When I attempt to run a CC transaction, it just times out and goes to page cannot be displayed. I have verified my cert from Paypal has been installed where it needs to be and the path to my pear directory is pointing to the correct location. I am using GoDaddy as my hosting provider, and I have modifed my HTTP.php file based on their recommendations (to allow the SSL proxy connections). I have adjusted the timers as recommended. I looked at the paypal wsdl file and verified it is pointing to the sandbox url.

 

I ran tcpdump (packet sniffing utility) on my PC and I only showed communications between myself and my website. I never saw any traffic go to paypal. Saying this, I am sure it is a coding issue somewhere (and I do not doubt it is something I have done). Can someone please help?

 

GoDaddy requires all curl connections to go through their proxy server. Contact them for that information or search this thread for the address.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

I have a simple question regarding merging PWA 1.1 into my site which has Paypal-WPP installed

 

in checkout_shipping.php I have this paypal modified section of code

 

				<td class="main" width="50%" valign="top">
<?php 
echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>'; 
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; 

} 
?>
</td>

 

 

The PWA instructions call for:

 

FIND

				<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>

 

REPLACE WITH

				<td class="main" width="50%" valign="top"><?php echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':'?'); ?></td>

 

Can someone help me to do this merge without breaking Paypal?

 

Thanks for the help!

Dave


-Dave

Share this post


Link to post
Share on other sites

Does this look correct?

 

				<td class="main" width="50%" valign="top">
<?php echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>'; 
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':' '); 

} 
?>
</td>


-Dave

Share this post


Link to post
Share on other sites
GoDaddy requires all curl connections to go through their proxy server. Contact them for that information or search this thread for the address.

 

I appreciate the response. I have already contacted GoDaddy and made the recommended changes. I was able to test the pear functionality sucessfully. Still no luck. Any ideas?

Share this post


Link to post
Share on other sites
Does this look correct?

 

				<td class="main" width="50%" valign="top">
<?php echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>'; 
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':' '); 

} 
?>
</td>

 

To anwer my own question, nope, that does not work as posted... can someone help me out please. Parse error here...

 

<?php echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>';

 

then again I am probably completely off alltogether


-Dave

Share this post


Link to post
Share on other sites
I have a simple question regarding merging PWA 1.1 into my site which has Paypal-WPP installed

 

in checkout_shipping.php I have this paypal modified section of code

 

				<td class="main" width="50%" valign="top">
<?php 
echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br>'; 
if(tep_session_is_registered('paypal_token')) { 
?>

<form method="post" name="form" action="paypal_wpp/ec/process.php">
<input type="hidden" name="express" value="1"> 
<input type="hidden" name="amount" value="<?=$cart->show_total();?>"> 
<?php echo tep_image_submit('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?> 
</form>
<?php 
}

else {  

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; 

} 
?>
</td>

The PWA instructions call for:

 

FIND

				<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>

 

REPLACE WITH

				<td class="main" width="50%" valign="top"><?php echo (($customer_id>0 || (defined('PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING') && PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING=='yes') )? TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>':'?'); ?></td>

 

Can someone help me to do this merge without breaking Paypal?

 

Thanks for the help!

Dave

 

any help please?

I am pretty sure this is why my address information is not showing up in checkout_shipping and checkout_payment. or do I have a problem elsewhere??

 

PWA1_1_BrokenAddress.jpg


-Dave

Share this post


Link to post
Share on other sites

I am getting the following errors when clicking on the Checkout Express Button or if I go all the way through the process and try and complete a purchase.

 

Any help would be appreciated...

 

Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/baske3/public_html/cart/includes/modules/payment/paypal_wpp.php on line 304

 

Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/baske3/public_html/cart/pear/') in /home/baske3/public_html/cart/includes/modules/payment/paypal_wpp.php on line 304

 

Thank You,

 

Jeff

Share this post


Link to post
Share on other sites
I am getting the following errors when clicking on the Checkout Express Button or if I go all the way through the process and try and complete a purchase.

 

Any help would be appreciated...

 

Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/baske3/public_html/cart/includes/modules/payment/paypal_wpp.php on line 304

 

Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/baske3/public_html/cart/pear/') in /home/baske3/public_html/cart/includes/modules/payment/paypal_wpp.php on line 304

 

Thank You,

 

Jeff

 

Jeff,

That points to a problem in the Pear module installation. Check the installation instructions (README.html) that were provided with the contribution. Specifically, make sure that /home/baske3/public_html/cart/pear/Services/PayPal.php exists, or update the Pear path setting in the module's configuration screen to point to the directory where you installed the Pear modules.

 

--Glen

Edited by SteveDallas

Share this post


Link to post
Share on other sites

Alright I've got this contrib hitting the sandbox properly. I just want to verify that the process is the way it should be, because it seems a bit redundant with the Express Checkout.

 

1. I go through to the payment page (with existing account) and check the EC payment button - hit continue

 

2. Log into Paypal

 

3. Confirm order on paypal

 

4. I get taken back to the checkout_shipping page?

 

 

Is this how it is supposed to flow? Or is there a session variable getting lost somewhere making it go back too far? The transaction works, but the customer will have to make a few extra steps again, which may be a bit confusing.

 

Is there any way that I can get it to go to checkout_confirmation page instead?

 

Thanks for all the help and suggestions!

Share this post


Link to post
Share on other sites

Yes, this issue has been discussed. The reason is basically because they have the ability to change their shipping address which would mean that shipping needs to be recalculated. If their account's address was next door and shipping was $1, but the address returned from PayPal was in Timbuktu, you'd want to make sure it's charging the right amount for shipping.

 

There's some commented out code in the source of where I started working on this so that if the zip code returned is the same as the one on their account, it would send them to checkout_confirmation. Then I realized that I should just call the selected shipping module directly and do it all automatically, forwarding everyone to checkout_confirmation and never finished.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Whoops, Mohsin beat me. The new version should come out today.

 

Yes, though that didn't work for me.

 

I changed those two lines to read as follows, may be because I had register_globals mod installed?

 

 

$paypal_ec_token = $response->getToken();

tep_session_register('paypal_ec_token');

$_SESSION['paypal_ec_token'] = $paypal_ec_token;

 

By the way, I still can't find the post that JoyRide mentions about solving my order problem. Where is this??

 

Same problem here after an "upgrade". posted earlier about it.

Share this post


Link to post
Share on other sites
Yes, this issue has been discussed. The reason is basically because they have the ability to change their shipping address which would mean that shipping needs to be recalculated. If their account's address was next door and shipping was $1, but the address returned from PayPal was in Timbuktu, you'd want to make sure it's charging the right amount for shipping.

 

There's some commented out code in the source of where I started working on this so that if the zip code returned is the same as the one on their account, it would send them to checkout_confirmation. Then I realized that I should just call the selected shipping module directly and do it all automatically, forwarding everyone to checkout_confirmation and never finished.

 

Ah, thanks. I saw that hidden code in there and thought that might be in the works. Any idea if that'll make it into the next release?

 

This is a great contribution I am really pleased with the seamlessness of the module. Getting the ISP support and configuration was a bit of a challenge, but the module seems to be solid.

 

Thanks

Share this post


Link to post
Share on other sites
Yes, though that didn't work for me.

 

I changed those two lines to read as follows, may be because I had register_globals mod installed?

$paypal_ec_token = $response->getToken();

tep_session_register('paypal_ec_token');

$_SESSION['paypal_ec_token'] = $paypal_ec_token;

 

By the way, I still can't find the post that JoyRide mentions about solving my order problem. Where is this??

 

Mohsin, it didn't work for me either and it is indeed because the register globals mod is installed and reg globals are disabled. What I did to fix it was to change the lines you already have changed, plus do this:

 

Around line 516 change:

 

//$_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;

tep_session_register('paypal_ec_payer_info');

 

TO:

 

tep_session_register('paypal_ec_payer_info');

$_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;

Share this post


Link to post
Share on other sites
Around line 516 change:

 

//$_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;

tep_session_register('paypal_ec_payer_info');

 

TO:

 

tep_session_register('paypal_ec_payer_info');

$_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;

 

I understand that ec_token change was important. What does this change do? How important is this?

Share this post


Link to post
Share on other sites
Hello,

 

I am having a issue where customers are being billed twice thru paypal, when using Direct payment. I am using version ""PayPal Direct Payments & Express Checkout v0.5""

 

The response is passed back fine in the admin, but orders are being double charged on paypals side. Express checkout works fine. I have no contributions install other than STS and additional shipping.

 

Any help would be great this is a live store and I am just lost on what to do.

 

Thanks for your time.

 

 

Can anyone please help me with this issue? Any suggestions as to what could be causing this would be great. It has turned into a real problem.

 

Thanks for all your time.

Share this post


Link to post
Share on other sites

Try adding some javascript to your checkout_confirmation page so that they can only click the continue button once.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Try adding some javascript to your checkout_confirmation page so that they can only click the continue button once.

 

Hi dynamoeffects,

 

Thanks for the reply - the weird thing is that its every order. Customers are receiving a confirmation of one order and so am I, however they are being billed twice and I am receiving two receipts from paypal with separate authorization codes

 

Thanks for your time!

Share this post


Link to post
Share on other sites
My problem solved, I tried closing everything up and retrying and it works like a charm.

 

However... I noticed another problem, my orders are messed up. They are in the database, but they aren't listed in Administration Area > Orders (0 of 0 orders). They aren't even displayed in my previous orders under my account. It says 0 of 0 orders, and the pagination goes like: -4, -3, -2, -1, 0.

 

Any ideas about this?

 

I can't find a solution for this one? Anybody?

Share this post


Link to post
Share on other sites

Dear forum,

 

 

I have spent days searching for answers for my seemengly simple problem but could not find any.

I have installed and configured 0.71 according to the instructions.

I currently have a credit card, paypal and money order payement modules installed.

In my understanding once direct payment is enabled, on checkout_payment I should see yet another form of payment similar to my credit card. Problem #1 - I see no extra payment options, but my pre-existing ones. Problem #2 - if I choose express checkout instead - so after successfully going through PayPal sandbox I get back to the site where I am directed to checkout_payment page with error in red displayed "Please select a payment method for your order". Debug is enabled and no emails have been received.

What do I do wrong?

 

Thanks again

Share this post


Link to post
Share on other sites

Hello,

 

I intended this to be posted in the PayPal WPP thread... somehow it landed under the Payment Modules general category:

 

I just downloaded yesterday the most recent version of OS Commerce and the latest version of the Paypal Contribution (paypal_wpp_0.7.3)

 

I followed the instructions in their entirety, and installation appears to have been a success, but when I access the module section I see only Paypal Direct Payment and not "PayPal Direct Payment & Express Checkout".

 

Are they the same thing? What have I missed? Can anyone help?

 

Thank you.

 

Dario

Share this post


Link to post
Share on other sites

Yes, it's the same thing.

 

palamaster, as stated in your other thread, you didn't install it correctly. Use a program that compares files to make the changes.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
Is it possible to disable express checkout?

It is PayPal's policy to have the express checkout enabled when you use the WPP. You should not disable this service if you are going to use the Web Payment pro.


Regards,

Share this post


Link to post
Share on other sites

Hello all.

 

I have read all the posts about my problem, but can't seem to get it resolved.

 

I am getting the call to undefined function setopt() error.

 

I have the pear files installed from both packages. I am certain that they are in the correct directory, because if they weren't, I would be getting errors on the require_once lines.

 

I even tried copying the function from Client.php and pasting it directly into paypal_wpp.php. Even with the function defined at the very top of the file, it is still throwing the undefined error at me. How can this be? :blink:

Share this post


Link to post
Share on other sites
Even with the function defined at the very top of the file, it is still throwing the undefined error at me. How can this be?

 

Here's some more wierdness... I figured I would plop the setopt() function into general.php to see how far I could get. Now it is telling me I am redefining the function. :huh: I thought it couldn't find it...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×