Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Testing New PayPal Express Checkout Module


Harald Ponce de Leon

Recommended Posts

The 2.3.3.4 version I am using came with Paypal Express v1.2 (API 60.0). I was having a slight problem with it, so I downloaded and installed the current version (Paypal Express v3.0, API 112).

 

http://addons.oscommerce.com/info/5658

 

Immediately, the Paypal Express button disappeared from my site.

 

In the installation PDF file, there is this:

 

The following codebase changes must also be performed to allow the "Check Out with PayPal" image

button to appear on the shopping cart page:

 

http://svn.oscommerce.com/fisheye/changelog/osCommerce?cs=1699

 

This is not a valid link.

 

Malcolm

 

PS: I had to revert back to the v1.2 version.

Edited by ArtcoInc
Link to comment
Share on other sites

Immediately, the Paypal Express button disappeared from my site.

 

That old link you posted was only in regard to v2.2MS2. If you are using v2.3.3.4 then the PayPal Express Checkout button should automatically be shown on your shopping cart page.

:heart:, osCommerce

Link to comment
Share on other sites

If you are using v2.3.3.4 then the PayPal Express Checkout button should automatically be shown on your shopping cart page.

 

Thank you. I just re-installed Paypal Express v3.0 (copying over the three relevant files). Now, when I add an item to the cart, I *do* see the Paypal Express button. I can not say why it wasn't there before. But, ....

 

As I mentioned in another thread <http://www.oscommerce.com/forums/topic/396978-guest-checkout-paypal-express-and-sales-tax/>, I have a Guest Checkout add-on installed.

 

With the v1.2 version of Paypal Express, clicking on the Paypal Express button took me to Paypal.

 

Now, with the v3.0 of Paypal Express, when I click on the Paypal Express button, it takes me to the Login Page, which defeats the purpose of the Guest Checkout.

 

And, I am still trying to resolve the Sales Tax issue discussed in the other thread.

 

Thank you!

 

Malcolm

Link to comment
Share on other sites

Now, with the v3.0 of Paypal Express, when I click on the Paypal Express button, it takes me to the Login Page, which defeats the purpose of the Guest Checkout.

 

PayPal Express Checkout v3.0 actually supports guest checkouts much better than previous versions. It is enabled on our demonstration site at:

 

http://demo.oscommerce.com

 

I don't know why you are being directed to the login page first - this behaviour is not coded in the payment module and could be due to customizations you have performed on your store.

 

Could you post a link to your store so I can experience the described behaviour?

:heart:, osCommerce

Link to comment
Share on other sites

I don't know why you are being directed to the login page first - this behaviour is not coded in the payment module and could be due to customizations you have performed on your store.

 

Could you post a link to your store so I can experience the described behaviour?

 

As far as I can see, there were only 3 files changed between the version of Paypal Express that came with the version of osC I'm using (Paypal Express v1.2) and the new Paypal Express v3.0

 

catalog/ext/modules/payment/paypal/express.php

 

catalog/included/languages/english/modules/payment/paypal_express.php

 

catalog/includes/modules/payment/paypal_express.php

 

(plus the addition of the button images)

 

Visit my site at: http://www.shelbowhispertips.com/

 

Add any item to the cart, then click on the Paypal button.

 

Likewise, if I go through the checkout process, select Paypal as the payment method, click on continue to confirmation, I again return to the login page.

 

If I return the original 3 files, the checkout process works fine (except for the sales tax issue). I've tested this with both Firefox and Chrome.

 

Thank you for your time and attention!

 

Malcolm

Link to comment
Share on other sites

Please try again with these files:

 

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/includes/modules/payment/paypal_express.php

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/includes/languages/english/modules/payment/paypal_express.php

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/ext/modules/payment/paypal/express.php

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/ext/modules/payment/paypal/paypal.com.crt

 

After copying those files over, visit the Administration Tool -> Modules -> Payment -> PayPal Express Checkout configuration page to automatically update any missing configuration parameters. Please also review the configuration settings.

 

**EDIT: The following file should also be copied:

 

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/admin/ext/modules/payment/paypal/paypal_express.php

Edited by Harald Ponce de Leon
Added missing file

:heart:, osCommerce

Link to comment
Share on other sites

 

I'm going to try this in one of my shops. The last file is a cert file? Even if the shop already has an ssl cert?

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Thank you.

 

I see a couple of new settings in the configuration page:

 

Page Style (blank)

 

Verify SSL Certificate (T/f)

 

Proxy Server (blank)

 

 

After loading these four files onto my in-house test server, and leaving the new settings as default, I tried the 'Gateway Connection Test'. It returns an error: "An error occurred. Please refresh the page and try again."

 

I've tried the test several times, with the Verify SSL Certificate both True and False. Same error.

 

I then loaded these four files to the public test server. Here, I also get the same error message when doing the Connection Test.

 

That said, after a couple of mis-steps, I am now able to go into the Paypal checkout (both on the in-house server and the public server)! :)

 

Also, it looks like sales tax *is* being applied correctly :) :) :)

 

Thank you *very* much for all of your assistance! I will continue to test things here.

 

Malcolm

Link to comment
Share on other sites

** Update **

 

While testing, I received an email,

 

Subject: PayPal Express Debug E-Mail

 

There were only two lines in the email:

 

$HTTP_POST_VARS:

 

$HTTP_GET_VARS:

 

The email was sent from the shop owner's email address, and was addressed to the email address I have listed in the Debug E-Mail Address configuration field.

 

 

Am I correct in *assuming* that, if there is an email address in the Debug E-Mail Address field, than a debug email will be sent for every (?) PayPal Express order, even if there is no 'debug data'? And if so, if I delete the email address in the Debug E-Mail Address field, then no debug emails will be sent?

 

Thank you!

 

Malcolm

Link to comment
Share on other sites

@@Harald Ponce de Leon please disregard my question above about the crt file. I did this in stall and everything worked well until the end of the PayPal transaction where I was taken back to a page in the Better Checkout addon process wanted me again to select what payment method. Issue might be that add on and I'll look into it further here. Thanks

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

The last file is a cert file? Even if the shop already has an ssl cert?

 

The PayPal public certificate is used to verify that the API calls sent to PayPal are actually being sent to PayPal. This protects against man-in-the-middle attacks; we've had no reports of this happening with earlier module versions, it has just been added in as an extra security layer.

:heart:, osCommerce

Link to comment
Share on other sites

After loading these four files onto my in-house test server, and leaving the new settings as default, I tried the 'Gateway Connection Test'. It returns an error: "An error occurred. Please refresh the page and try again."

 

Sorry, I forgot to post a link to a file:

 

https://raw.githubusercontent.com/osCommerce/oscommerce2/master/catalog/admin/ext/modules/payment/paypal/paypal_express.php

 

That should be copied to:

 

admin/ext/modules/payment/paypal/paypal_express.php

 

After copying that file, the test connection link should then work.

:heart:, osCommerce

Link to comment
Share on other sites

  • 2 weeks later...

Hello @@Harald Ponce de Leon,

 

I would like to adapt the new payment modules for iOsC Mobile. The modified modules need to use:

 require(DIR_WS_INCLUDES . 'modules/payment/paypal_express.php');
 $paypal_express = new paypal_express();

Instead of the hardcoded path in the original module:

 require('includes/modules/payment/paypal_express.php');
 $paypal_express = new paypal_express();

Is it secure to apply this change or is there a specific reason to use hardcoded paths?

 

Thank you

Rainer

Link to comment
Share on other sites

@@Harald Ponce de Leon

 

Suggestion - not just Express, but all Paypal modules...

 

When the data is returned from PayPal, like

 

Transaction ID: 9WE76646545609

AVS Code: Y

CVV2 Match: M

 

It should not be placed in the Comments for buyers eyes. Please consider placing this data in a new column to the right of Comments, maybe call it Transaction Data or whatever.

 

Thanks!

-Dave

Link to comment
Share on other sites

Hi Dave..

 

The transaction information is not available to customers and is stored in a private order status level. Please make sure the Transaction Order Status level is set to a private order status level. Order Status levels can be set private on the following page:

 

Administration Tool -> Localization -> Orders Status

 

The module creates a new order status level for transactions automatically when it is installed and automatically sets it as a private order status.

Edited by Harald Ponce de Leon

:heart:, osCommerce

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

Just installed paypal express 3.1 on my live store and found that I had to modify this line to get the spanish product names with accents correct displayed in PayPal:

 

in: ext/modules/payment/paypal/express.php line 634:

        $item_params['L_PAYMENTREQUEST_0_NAME' . $line_item_no] = utf8_decode($product['name']);

- OsC 2.3.3.4

- Database all in UTF-8

- CHARSET in main language file correct defined in utf-8

 

Rainer

Edited by raiwa
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

"Pay Now" is used as the majority of the cases the order will be processed directly skipping the checkout confirmation page. If the order totals do not match (due to a third pary order total module manipulating the tax values, or Instant Update not being used), the checkout confirmation page is shown.

ok, i installed this add-on and modify it a little to use paypal after the checkout_confirmation page.

it works very fine but there are no items and shipping-costs in the Paypal-confirmation e-mail

 

how can i handle the "order totals check" ?

Edited by Mercurius
Link to comment
Share on other sites

it works very fine but there are no items and shipping-costs in the Paypal-confirmation e-mail

 

 

 

I think the error is between different contents of the arrays from two functions:

(the correctly ist the getExpressCheckoutDetails)

 

 

doExpressCheckoutPayment:

  ["SHIPPINGCALCULATIONMODE"]=> (8) "FlatRate"

  ["INSURANCEOPTIONSELECTED"]=> (5) "false"

  ["SHIPPINGOPTIONISDEFAULT"]=> (5) "false"

  ["SHIPPINGOPTIONAMOUNT"]=> (4) "6.90"

  ["SHIPPINGOPTIONNAME"]=> (38) "Shipping"

  ["PAYMENTINFO_0_AMT"]=> (4) "0.50"

 

getExpressCheckoutDetails:

  ["SHIPPINGCALCULATIONMODE"]=> (8) "FlatRate"

  ["INSURANCEOPTIONSELECTED"]=> (5) "false"

  ["SHIPPINGOPTIONISDEFAULT"]=> (4) "true"

  ["SHIPPINGOPTIONAMOUNT"]=> (4) "0.00"

  ["SHIPPINGOPTIONNAME"]=> (31) "Pickup"

  ["PAYMENTREQUEST_0_AMT"]=> (4) "0.50"

  ["PAYMENTREQUEST_0_ITEMAMT"]=> (4) "0.50"

  ["PAYMENTREQUEST_0_SHIPPINGAMT"]=> (4) "0.00"

 

 

 
how can I get the correct values ​​in the function doExpressCheckoutPayment?
Link to comment
Share on other sites

  • 1 month later...

I'm using this on a 2.2RC2A store.   From this thread http://www.oscommerce.com/forums/topic/377501-paypal-will-not-convert-description-with-payment/?p=1594287

 

tried the following code

//DESC
$params['L_PAYMENTREQUEST_' . '0' . '_' . 'DESC' . $line_item_no] = '';
    for ($j=0, $o=sizeof($product['attributes']); $j<$o; $j++) {											
$params['L_PAYMENTREQUEST_' . '0' . '_' . 'DESC' . $line_item_no] .= $product['attributes'][$j]['option'] . ':' . $product['attributes'][$j]['value'] . ', ';							

it adds the product name correctly to the PP confirmation email but not the attributes.  They appear as Item # 25{4}215{3}203{1}47{2}201  where each value is an id.  i want the production options name and its value, ie Size: Large.  

Thanks for any assistance!

Link to comment
Share on other sites

Hello,

 

Just installed paypal express 3.1 on my live store and found that I had to modify this line to get the spanish product names with accents correct displayed in PayPal:

 

in: ext/modules/payment/paypal/express.php line 634:

        $item_params['L_PAYMENTREQUEST_0_NAME' . $line_item_no] = utf8_decode($product['name']);

- OsC 2.3.3.4

- Database all in UTF-8

- CHARSET in main language file correct defined in utf-8

 

Rainer

Hi Raiwa,

 

I followed your instruction to modify line 634. But no luck to display UTF-8 correctly in PayPal.

Is there anythings else needed to be modified?

Link to comment
Share on other sites

Hi Raiwa,

 

I followed your instruction to modify line 634. But no luck to display UTF-8 correctly in PayPal.

Is there anythings else needed to be modified?

Hello @@teruo1992,

 

Does it display identical with the modification and without?

Can you please post an example how it displays with and without the mod.

 

kind regards

Rainer

Link to comment
Share on other sites

  • 2 months later...

After putting backups back and spending hours on this issue,  we finally figured it out.

Problem description: V2.3.4 Oscommerce with PayPal Express Modules. When an item is in the cart and send to paypal Express the site correctly went to the PayPal site with the item, but as soon as you hit the button "Pay Now" the Paypal site is authorizing the payment and then after a few seconds goes back to the store without processing the order. No error mails where provided, so we had no clue except that the transaction was cancelled in some strange way.

The solution is in the the catalog/includes/configure.php file and two lines we changed were from:
 

define('HTTP_COOKIE_DOMAIN', 'http://www.yourdomain.com'); 


define('HTTPS_COOKIE_DOMAIN', 'https://www.yourdomain.com');  
 
to:

define('HTTP_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_DOMAIN', '');

I hope this helps with anyone having a similar problem.
 
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...