Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

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.

Link to comment
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?

Link to comment
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.

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment
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

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

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.

We use the add charge feature alot also, but not entirely sure that this would work for all customers. I have found that, for some odd reason, some customers dont like to use their card details on a website and would prefer to give them to a stranger they are talking to on a phone. How thats more secure i dont know, but you cant change some peoples perceptions.

 

I would love for this feature to work though, at the moment I am having to log into paypal to use the virtual terminal which is a pain... it means having to log into 2 systems to place 1 order.

 

Tony

Link to comment
Share on other sites

We use the add charge feature alot also, but not entirely sure that this would work for all customers. I have found that, for some odd reason, some customers dont like to use their card details on a website and would prefer to give them to a stranger they are talking to on a phone. How thats more secure i dont know, but you cant change some peoples perceptions.

 

I would love for this feature to work though, at the moment I am having to log into paypal to use the virtual terminal which is a pain... it means having to log into 2 systems to place 1 order.

 

Tony

 

the idea i had could do with being a seperate option to the system thats in place now.....although that still wouldn't help where people want to give details over the phone in cases where 3DS is required.

 

Virtual terminal wasn't available to us when we set up our payments pro account so we dont have any way to add a charge where 3DS is required at the moment!

Scott

Link to comment
Share on other sites

As a possible workaround, please test this out:

 

1) Disable the Cardinal Commerce features in the module.

 

2) Click the "Add Charge" button and charge a card that you know would regularly go to 3D Secure.

 

3) Re-enable Cardinal Commerce features and then let us know if the charge went through successfully.

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...