Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

Thats great Brian!!! many thanks!

 

I have updated to the new module and can succesfully process normal card payments. I havent got a maestro card to try this, but i was expecting with my normal visa card to get the verified by section after clicking submit at the end of the order, however it just processed it normally.

 

Does this only work for maestro payments, or should all orders be going through cardinal commerce and be verified?

 

Tanks again.

Share this post


Link to post
Share on other sites

All orders are passed through Cardinal, which determines whether or not the customer needs to go through their 3D-Secure flow. If so, the customer is forwarded to a new page to complete the 3D-Secure process. If not, the card is simply charged and the customer completes the checkout.


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

Hi All,

I am upgrading from version 0.9.2 to version 1.0.7. I uninstalled the old version, updated all files to RC2A and then installed the update. I had to update includes/modules/payment/paypal_wpp.php because I was loosing session ID and cart contents (I got logged out) when I tried to use Express Checkout.

 

      //These strings need to have ampersands escaped
  //mvigil514  bof To fix on wpp post 3696 4/29/2009, comment out 1st set of statements and uncomment 2nd set of statements //
  /*
     $order_info['PAYPAL_RETURN_URL'] = htmlspecialchars(tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=express_checkout', 'SSL'));
  $order_info['PAYPAL_CANCEL_URL'] = htmlspecialchars(tep_href_link($redirect_path, $redirect_attr, 'SSL'));
  */
  $temp_return_link = tep_href_link(basename($_SERVER['SCRIPT_NAME']), '', 'SSL');
  $order_info['PAYPAL_RETURN_URL'] = $temp_return_link . '&action=express_checkout';
  $order_info['PAYPAL_CANCEL_URL'] = $temp_return_link . '&action=ec_cancel';
  //
  // mvigil514 eof post 3696 //

 

At this point, it seems as if Paypal was working properly, but I hadn't done extensive testing. I proceeded to modify the code so that I could allow people to redeem a coupon after returning from Paypal. I made some changes and got that working, but it seems that Paypal quit working. So, I undid all the changes???? I made a backup of the site, but no matter how I try to revert, I can't get Paypal to work.

 

This is what is wrong. I click Use Express Checkout. I get directed to Sandbox. I sign in and choose continue at Paypal. I get redirected to my site. I choose shipping, continue and go to payment to choose coupon, if necessary, and continue and then confirm. The checkout is a success. The order is processed, emails are sent out, order shows up in admin, but the payment method isn't recorded or displayed anywhere, Paypal merchant account doesn't get paid and no "capture funds" button appears in the admin order edit screen.

 

Additionally, when I use credit card on site, the payment method does not appear either. Also, I can use any CC number and it will still let me check out (I don't know if this is supposed to happen or not). I certainly would appreciate any help anyone can give me. I hope I'm just missing something obvious.

 

Michael

Share this post


Link to post
Share on other sites

Hmmm, try changing it back to what it used to be:

 

$order_info['PAYPAL_RETURN_URL'] = tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=express_checkout', 'SSL');
$order_info['PAYPAL_CANCEL_URL'] = tep_href_link($redirect_path, $redirect_attr, 'SSL');

 

If that works I'll revert it back in the repository.

Edited by dynamoeffects

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

all seems to be working fine for me here now, have sucessfully taken some transactions from customers through cardinal commerce.

 

One thing the guy from CC said is that the Verified by and secured by logos with links to more info are missing from the payment pages... presume this just needs to go on the payment confirmation page if processing by card?

Share this post


Link to post
Share on other sites

Hi All!

I am upgrading from version 1.0.7 to version 1.0.8. and the checkout button function perfect, but the button Checkout with Paypal don't go to Paypal.

 

What is wrong?

 

 

Very thank's for support!!!

Share this post


Link to post
Share on other sites

@Dangermouse: Right now those logos are not included. It's mentioned in the documentation, but I couldn't find the links they want them pointed to so I didn't include it in this release. If you do find out the URLs, please share them.

 

@edythor: Run the wpp_diagnostics.php file and make sure that your installation is complete.


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

Di,

The one page checkout he referred to is a commercial product by Brian (dynamoeffects). See his profile for a link to his product. There are other attempts at one page checkout in the contributions library. I don't know how well any of them work, but I know that Brian stands behind his product. Due to differences in module implementation, there are limits on which payment and shipping modules are supported.

 

Glen

 

 

Hi Glen,

 

I was wondering if you or Brian might know which shipping module works best with Dynamo PayPal WPP? Most of my products will have free shipping but other will have various rates according to the vendor. Are 'Individual Product Shipping 4.5' or 'Multi-Vendor Shipping 1.2.3' compatible?

 

Thanks,

 

Nick

Share this post


Link to post
Share on other sites

Hmmm, try changing it back to what it used to be:

 

$order_info['PAYPAL_RETURN_URL'] = tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=express_checkout', 'SSL');
$order_info['PAYPAL_CANCEL_URL'] = tep_href_link($redirect_path, $redirect_attr, 'SSL');

 

If that works I'll revert it back in the repository.

Hi Brian,

 

I tried changing it to what you have here, and it does work. For some reason or other, the version I downloaded had "htmlspecialchars" in front of each link. This is what did not work.

 

At any rate, this code does work. However, I do have another problem I was hoping you could help me with. I've got the contribution working in the sandbox. I modified checkout_payment.php in order to allow coupons to be redeemed during the checkout process. This is the code.

<!-- Points/Rewards Module V2.1rc2a Redeemption box bof -->
<?php
 if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) {
  echo points_selection();
  if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) {
	  echo referral_input();
  }
 }
?>
<!-- Points/Rewards Module V2.1rc2a Redeemption box eof -->
<?php 
//---PayPal WPP Modification START ---//
 } else {
   tep_paypal_wpp_switch_checkout_method(FILENAME_CHECKOUT_PAYMENT);

//---mvigil514 bof CCGV Mods ---//
// #################### Added CGV ###################### 
 echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM
// #################### End Added CGV ######################
//--- mvigil514 eof CCGV Mod ---//
 }
//---PayPal WPP Modification END ---//

The portion with mvigil514 comments is where I added the coupon redemption. My problem is that when a customer has a Gift Certificate balance, the checkout process doesn't work. What happens is the customer will go through the entire checkout process, express checkout or direct payment, and everything appears to have worked properly. The order is inserted into the database, and the customer can see it in order history and admin can also see the order. The problem is that the payment method or information is not being passed to or from Paypal as far as I can tell. The payment info never makes it into the database and therefore does not show up in the Paypal merchant account. I don't know if I have given you enough information, but any help would be appreciated.

 

I am using CCGV 5.16. Let me know if you need any more information. Thank you for your time.

 

Michael

Edited by mvigil514

Share this post


Link to post
Share on other sites

Brian, I didn't mention it, but I am upgrading from version 0.9.2. CCGV was working fine with this version.

 

Michael

Share this post


Link to post
Share on other sites

Hi Brian,

 

I tried changing it to what you have here, and it does work. For some reason or other, the version I downloaded had "htmlspecialchars" in front of each link. This is what did not work.

 

I put the htmlspecialchars() calls in there. That call is used to turn ampersands into "&" entities, which must be done for PayPal to handle the links correctly. If your version of tep_href_link() already does that (usually due to a change for HTML DTD conformance), the link gets double-encoded. I'll work on a version that checks to see if the output of tep_href_link() is already encoded. The code works correctly for stock MS2 and RC2a installations.

 

Something like this should work for all cases (untested):

$order_info['PAYPAL_RETURN_URL'] = htmlspecialchars(htmlentitydecode(tep_href_link(basename($_SERVER['SCRIPT_NAME']),'action=express_checkout', 'SSL')));
$order_info['PAYPAL_CANCEL_URL'] = htmlspecialchars(htmlentitydecode(tep_href_link($redirect_path, $redirect_attr, 'SSL')));

At any rate, this code does work. However, I do have another problem I was hoping you could help me with. I've got the contribution working in the sandbox. I modified checkout_payment.php in order to allow coupons to be redeemed during the checkout process. This is the code.

[snip]

 

The portion with mvigil514 comments is where I added the coupon redemption. My problem is that when a customer has a Gift Certificate balance, the checkout process doesn't work. What happens is the customer will go through the entire checkout process, express checkout or direct payment, and everything appears to have worked properly. The order is inserted into the database, and the customer can see it in order history and admin can also see the order. The problem is that the payment method or information is not being passed to or from Paypal as far as I can tell. The payment info never makes it into the database and therefore does not show up in the Paypal merchant account. I don't know if I have given you enough information, but any help would be appreciated.

 

I am using CCGV 5.16. Let me know if you need any more information. Thank you for your time.

 

Michael

 

CCGV 5.16 is rather old (uploaded 8 Feb 2006), and CCGV itself is a mess. I would have to look at it to determine the problem. Maybe Brian has some insight into the issue.

 

--Glen

Share this post


Link to post
Share on other sites

@SteveDallas: Ah ok, I knew there was a good reason those lines were modified so I haven't reverted it. Since detecting encoded URLs would be spotty at best, let's try copying the working tep_href_link() function, strip it down to barebones and then add it as a method in the module. That way we have a way to create URLs that will always be standard (and won't be affected by whatever SEO URL contribution is installed).

 

@mvigil514: Try moving that CCGV line below the "}" bracket. Regarding CCGV, best to stick with Rhea's CCGV (trad). Even that needs to be cleaned up, but it's far more reliable than the alternative. If you DO NOT need gift vouchers/gift certificates, stick with kgt's Discount Coupon contribution. Much simpler to install and many fewer problems.

Edited by dynamoeffects

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

@SteveDallas: Ah ok, I knew there was a good reason those lines were modified so I haven't reverted it. Since detecting encoded URLs would be spotty at best, let's try copying the working tep_href_link() function, strip it down to barebones and then add it as a method in the module. That way we have a way to create URLs that will always be standard (and won't be affected by whatever SEO URL contribution is installed).

 

Actually, the basic code that I posted above should do the trick. It decodes the URL, then re-encodes it. If the URL isn't encoded, the html_entity_decode() call does nothing. This will work for PHP v4.3.0 and later and should work for all stock and modified versions of tep_href_link(). (There's another solution using only htmlspecialchars(), but it requires PHP 5.1 to work.)

 

Here it is with the correct decode function call:

$order_info['PAYPAL_RETURN_URL'] = htmlspecialchars(html_entity_decode(tep_href_link(basename($_SERVER['SCRIPT_NAME']),'action=express_checkout', 'SSL')));
$order_info['PAYPAL_CANCEL_URL'] = htmlspecialchars(html_entity_decode(tep_href_link($redirect_path, $redirect_attr, 'SSL')));

 

The main reason for not messing with tep_href_link() is that SEO URL contributions modify it, though it shouldn't affect checkout URLs. But the solution above is much simpler to implement than reverse engineering tep_href_link().

 

--Glen

Edited by SteveDallas

Share this post


Link to post
Share on other sites

Just come across an issue with this, not sure whats caused it...

 

I've just tried to put an order through manually, using the "add charge" feature on the orders page in admin, and its come up with an error:-

 

https://www.domain.co.uk/admin/includes/paypal_wpp/FILENAME_PAYPAL_WPP_3DS does not exist

Why would it be asking me for the 3DS page when logged into admin? for phone orders we should never have access to a customers 3DS password, it should just go through like a virtual terminal transaction shouldnt it?

 

Have I missed something here?

 

Tony

Share this post


Link to post
Share on other sites

@Glen: Sounds good. I'm fixing a bug right now so I'll update the repos with that change.

 

@Dangermouse: That's a bug. Make the following change to /admin/includes/paypal_wpp/paypal_wpp_include.php:

 

Find this:

include(DIR_FS_CATALOG . DIR_WS_INCLUDES . 'modules/payment/paypal_wpp.php');

 

Add this ABOVE that line:

define('FILENAME_PAYPAL_WPP_3DS', 'paypal_wpp_3ds.php');

 

The "Add Charge" feature won't work if the customer's card has to go through 3D Secure. I'll update the module to disable that button if the 3D Secure features are enabled. The feature isn't a virtual terminal but uses the same API as the customer does when checking out. You only have to enter a card number because it automatically includes all of the customer's details.

Edited by dynamoeffects

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

[The "Add Charge" feature won't work if the customer's card has to go through 3D Secure. I'll update the module to disable that button if the 3D Secure features are enabled. The feature isn't a virtual terminal but uses the same API as the customer does when checking out. You only have to enter a card number because it automatically includes all of the customer's details.

Ahh that is a shame, this is such a useful feature and has been used a lot by us. Just not the same having to log into paypal to do a transaction.

Share this post


Link to post
Share on other sites

Hi,

 

I have installed this module and would like to ask does it work with STS templates?

 

The reason is when the customer clicks on confirm payment the page paypal_wpp/paypal_wpp_3ds.php loads up, but it is not loading the template file, and the code on the page is jumbled.

 

Can anyone help?

Share this post


Link to post
Share on other sites

What is the filename of the cert? I had my client generate it for me and email it to me... it came through as a .txt file. Should it be a .pem file?

 

cert_key_pem.txt

 

vs

 

cert_key.pem

 

 

Thanks in advance!

Share this post


Link to post
Share on other sites

What is the filename of the cert? I had my client generate it for me and email it to me... it came through as a .txt file. Should it be a .pem file?

 

cert_key_pem.txt

 

vs

 

cert_key.pem

 

 

Thanks in advance!

Either way will work. Just make the name in the admin match the full path name of the file on the server.

 

--Glen

Share this post


Link to post
Share on other sites

A new version of the module has been uploaded with fixes for the issues in the last version. I also added Glen's html encoding fix and the Transaction ID is now clickable and will take you to the transaction detail page at PayPal.

 

@rrchairman: 3D Secure hasn't been tested with STS yet, but try this fix and let us know how it works. Open the /includes/paypal_wpp/paypal_wpp_3ds.php file and find this line:

 

<!-- body_eof //-->

 

Then BELOW it add this code:

<?php
if (is_object($sts)) {
if ($sts->display_template_output) {
$sts->restart_capture ('content');
}
}
?>

 

But more than likely it will need more than that.


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

A new version of the module has been uploaded with fixes for the issues in the last version. I also added Glen's html encoding fix and the Transaction ID is now clickable and will take you to the transaction detail page at PayPal.

 

@rrchairman: 3D Secure hasn't been tested with STS yet, but try this fix and let us know how it works. Open the /includes/paypal_wpp/paypal_wpp_3ds.php file and find this line:

 

<!-- body_eof //-->

 

Then BELOW it add this code:

<?php
if (is_object($sts)) {
if ($sts->display_template_output) {
$sts->restart_capture ('content');
}
}
?>

 

But more than likely it will need more than that.

Hi, I've just updated the module to v1.0.9 and found that the EC button on my website no longer works, just get sitename/checkout.php/action/express_checkout/return_to/checkout.php any ideas as to where or how I can fix?

Share this post


Link to post
Share on other sites

Sorry for the duff post above, Just run diagnostics and everything passed but for this

 

Did PayPal respond without errors? (If not, errors are below) No

Internal Error (10001)

Internal Error

Share this post


Link to post
Share on other sites

Sorry for the duff post above, Just run diagnostics and everything passed but for this

 

Did PayPal respond without errors? (If not, errors are below) No

Internal Error (10001)

Internal Error

This error occurs when the email address for your store doesn't match your paypal email address. I've changed the store email address and get a full pass but am still not able to use the paypal button.

Share this post


Link to post
Share on other sites

The "Add Charge" feature won't work if the customer's card has to go through 3D Secure. I'll update the module to disable that button if the 3D Secure features are enabled. The feature isn't a virtual terminal but uses the same API as the customer does when checking out. You only have to enter a card number because it automatically includes all of the customer's details.

 

Just an idea but if the add charge is only going to work for some customers would it be a good idea to be able to create some sort of charge request for customers who are using the 3DS.

 

So for example in admin you would click create charge, add the amount etc and then an email is sent to the customer with a login link that will take them to a screen where they can fill out their credit card details and pay the charge added by admin.

 

This may also be useful where orders are added manually in admin (something we do a lot) so that customers can pay for these manual orders themselves rather than having to give us their credit card details over the phone or by email etc.

 

Just a thought, i'd be interested to know other peoples thoughts on it.

Edited by ProdigyMotorsport

Scott

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  

×