Post by Qphoria » Wed Nov 02, 2011 3:46 am

Paypal Express 1.5.x is finally released!
If you purchased my Paypal Express 1.4.x extension, you are eligible for a FREE upgrade.
Just redownload it from your account page on my site or the opencart extension store, depending on where you first purchased it.

Thanks to Dizarter for being a pest and forcing me to do it right.
What does it do:
================
This contrib adds support for Paypal Express payment integration.
This allows customers to checkout from any page, login to paypal's site to authorize payment, then get sent back to your store to complete the checkout process, Bypassing the address entry.


Requirements:
==============
* You will need vQmod for the one line change, or you can make the change manually in your header.tpl file
* You will of course need to have a Free Paypal Business or Free Premiere Personal account as that is required to use Paypal Express.


Main features:
==============
* No more Lost IPN/Lost order problems!
* Debug Mode option
* Uses the OpenCart Extension system. No files or core mods needed.
* Express Checkout Button is in a module for easy positioning on any layout
* Works with Guest & Logged in customers
* Allows for editing the shipping address before final checkout.
* Optional automatic account creation
* Sandbox mode Support
* Supported Currencies check and auto-convert
* Intelligent code self-handles many error scenarios in the process
* Checkout can be done at any point in the store, whether logged in or not
* More Features: http://www.lexiconn.com/blog/2010/04/di ... l-express/
BE SURE TO WATCH THE VIDEO DEMO TO FULLY UNDERSTAND HOW PAYPAL EXPRESS WORKS!

DEMO
DOWNLOAD

Attachments

ppx_flow.jpg

ppx_flow.jpg (36.31 KiB) Viewed 14431 times


Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by teratyke » Wed Nov 02, 2011 3:58 pm

After logging in to PayPal I get error log..
2011-11-02 7:49:28 - PHP Notice: Undefined index: shipping_address_id in

Code: Select all

/home/sites/savethe.co.uk/public_html/catalog/controller/checkout/shipping.php on line 11
I suspect though this is an issue with my configuration, not the PayPal Express extension.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by Qphoria » Thu Nov 03, 2011 4:07 am

teratyke wrote: 2011-11-02 7:49:28 - PHP Notice: Undefined index: shipping_address_id in

Code: Select all

/home/sites/savethe.co.uk/public_html/catalog/controller/checkout/shipping.php on line 11
I suspect though this is an issue with my configuration, not the PayPal Express extension.
It looks like this may be a 1.5.1.3 bug as shown here:
http://forum.opencart.com/viewtopic.php ... 20#p203760

To fix, try this.

1. EDIT: catalog/controller/checkout/shipping.php

2. FIND:

Code: Select all

if ($this->customer->isLogged()) {
3. REPLACE WITH:

Code: Select all

if ($this->customer->isLogged() && isset($this->session->data['shipping_address_id'])) {

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by NMG » Thu Nov 03, 2011 11:44 am

;D ;D ;D ;D ;D ;D ;D

-------------------------------------------------------------------------------
NMG Trading CC
Flight Simulator Airport Scenery Design
Web: http://www.nmgtrading.com
Skype: nmg.trading

-------------------------------------------------------------------------------


User avatar
NMG
Newbie

Posts

Joined
Sat Nov 20, 2010 1:42 pm
Location - South Africa

Post by teratyke » Wed Nov 16, 2011 7:34 pm

Fantastic. After a quick test seems to work great now - even the itemised list in PayPal
One small problem seem to be missing mail_line_4 in the language file paypal_express.php. I've commented it out in the controller.
Thanks

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by mstng67 » Sun Feb 19, 2012 1:05 am

I also just discovered that this extension is not working properly for my second multi-store. When I click on the PayPal express button I am taken to the default store shopping cart (which of course is empty) rather than the cart for the second store. Looking at the URL that the PayPal button is calling on shows the https address from the default site, not the second store.

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by Qphoria » Wed Feb 22, 2012 1:00 am

Update released:

v151.10 - 2012-Feb-21
- Completely redesigned the calculation and itemized listing code.
- All items and order totals are included as separate list items now
- Change SET and DO to reuse the same itemized listing function
- Fixed bug with 15x Guest address change if normal guest checkout was started.
- Added custom logo url option for people who don't have https and don't want to see the secure/non-secure warning on IE

ToDo:
- Add multistore support
- Add Editable Shipping address to ppx checkout

I also "may" be able to add the paypal express option back to the normal checkout flow. But I fear its design will just confuse people. I'll probably make it an admin option with warning.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mstng67 » Wed Feb 22, 2012 8:57 am

The admin option would be ideal! Thanks, and am looking forward to it!

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by Qphoria » Wed Feb 22, 2012 11:50 pm

Qphoria wrote:
teratyke wrote:Just updated to this latest version, now I have a new order total problem. Well actually its an old one that has reappeared...

This screen shots should explain.
The order totals as shown in the customers order confirmation email..


The order totals as shown by PayPal, the customer has paid 1p too much.


The total price of the goods is £9.99 not £10. There is a £1.99 postage charge. Total should be £11.98 as is reported by Opencart.


It'd be great if you could stop breaking stuff with these fixes.. ;)
This hasn't changed and has always been there. I have a fix for that too.. but im doing them in phases.
The reason for the issue is here: http://forum.opencart.com/viewtopic.php ... 87#p244304
So a better break down of the problem is shown here:
Image

See, paypal is adding all the items + tax + shipping prices and coming up with 138.88. It is using "post-conversion" prices for the math.

But opencart uses "pre-conversion" prices for the math, and then converts the total. This is the problem.

Technically if you do the math on the opencart confirm step, the math is wrong.
126.89
-0.06
+2.54
+9.51
=138.88

So the bug is really in the opencart core, not the payment extensions. However, I don't see this as an issue that can easily be resolved as it breaks the underlying foundation of math and rounding in opencart.

The only "fix" I can make in the Paypal Express code is to "fudge" that last penny off one of the line items or shipping or tax. Basically in this case I would force tax to be 9.50 instead of 9.51... but then you will complain about that too.

Another option would be to popup a message stating that "Due to conversion rounding, the paypal total will be 1 cent higher than your cart total on the next page".

This isn't a normal issue for most payment modules as Paypal is one of the few that tries to do its own math, instead of just letting you pass the data as string data. I do wonder how other carts handle this as the way opencart handles conversion calculation isn't really "wrong" persay. It's a tricky issue.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by markman-b » Thu Feb 23, 2012 12:20 am

Price Calculation discussion moved to http://forum.opencart.com/viewtopic.php ... 42#p254442

OC version 1.5.4.1


Active Member

Posts

Joined
Wed Aug 24, 2011 7:13 pm

Post by Qphoria » Thu Feb 23, 2012 5:23 am

Update released:

v151.11 - 2012-Feb-22
- Changed to associative data array
- Added multistore support (still same account for all stores, but different callback urls will work)
- Added option to show Paypal Express in normal checkout
- Added more comments to admin section
- Added shipping method check to ppx checkout if shipping previously selected

ToDo:
- Add Editable Shipping address to ppx checkout

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mstng67 » Fri Feb 24, 2012 12:45 am

Thanks so much for you quick work on the multistore support and adding the option for showing PayPal Express in the normal checkout!

I installed the update and sent a small sale through the second store using the normal checkout option, and it went through without a hitch.

I then added a module back in the upper right column of both sites. It worked fine on the default store, but not on the second store. It is still calling up the shopping cart for the default store when using the module.

The other thing I noticed was that the logo image from either store did not appear on the PayPal pages.

I tried uninstalling and then re-installing the entire module to make sure that none of the files were left over from the previous version.

Also, how can I include the PayPal Express button logo thingy after the text using the normal checkout option, other than calling for the image in the language file?

Thanks again for all your hard work on this module. I really appreciate it!

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by Qphoria » Fri Feb 24, 2012 4:10 am

mstng67 wrote: Also, how can I include the PayPal Express button logo thingy after the text using the normal checkout option, other than calling for the image in the language file?
That's a limitation of opencart. The language file method is really the only good way.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mstng67 » Fri Feb 24, 2012 5:13 am

No problem on the language file. I just wanted to know if there was a better way. Do you have any ideas on the other points?

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by mstng67 » Fri Feb 24, 2012 11:53 pm

Qphoria,

I am stumped as to why the module, when placed on a page in the second store, takes me back to the default store. It is not calling up the https address of the second store.

Default store: http://www.organmusicdownloads.com

Second store: http://www.wardorganist.com

I'll enable the module on the home page of the second store for a while so you can see what I am talking about.

Thanks!

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by Qphoria » Sat Feb 25, 2012 2:56 am

this was fixed in the v151.11b version released this morning.
Tested and working.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mstng67 » Sat Feb 25, 2012 4:19 am

I am still having the same problem. I installed v151.11b but it still is not pulling up the https:// address of the second store. It should have wardorganist.organmusicdownloads.com instead of just organmusicdownloads.com.

I compared all the files dealing with the "module" in the v151.11b that I downloaded with v151.11 in win merge, and all the files were identical. Where should I see the change that should correct the problem?

Thanks again, and sorry to be such a pain.

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by Qphoria » Sat Feb 25, 2012 4:46 am

mstng67 wrote:I am still having the same problem. I installed v151.11b but it still is not pulling up the https:// address of the second store. It should have wardorganist.organmusicdownloads.com instead of just organmusicdownloads.com.

I compared all the files dealing with the "module" in the v151.11b that I downloaded with v151.11 in win merge, and all the files were identical. Where should I see the change that should correct the problem?

Thanks again, and sorry to be such a pain.
all changes in the catalog/controller/payment/paypal_express.php file

Should be a few changes in that file
- added $store_url to the prepareOrder step (which would resolve this issue)
- fixed issue with exploding on "&" if the product has an "&" in the name.

Maybe browser is caching that file. Try downloading with a different browser

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mstng67 » Sat Feb 25, 2012 5:08 am

I've tried it on several browsers with the same results. Have you gone to my second site listed above and tried the PayPal express button on the home page after putting something in the cart?

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am

Post by mstng67 » Sat Feb 25, 2012 9:21 am

Qphoria,

I can see exactly why the problem should be resolved, but for some reason it just won't. I decided just to hard code the module template file for the second store rather than spending more time with it at the moment.

Now to trouble shoot the next thing - Why would the store logo not appear? I have followed these instructions, and left the field blank. "If you have SSL on your site, and want to use your main site logo leave this blank." It would sure be nice if the logo appeared on the PayPal pages.

New member

Posts

Joined
Thu Feb 02, 2012 6:31 am
Who is online

Users browsing this forum: No registered users and 3 guests