ArtcoInc Posted June 20, 2014 Posted June 20, 2014 Two quick questions: I have the Paypal Express module (v3.0, API 112) installed on a 2334bs shop. When the customer works up an order, and clicks on the Paypal Express button, it takes them to the standard (desktop) page on Paypal. 1) How can I take the user to the Paypal Express Mobile page? In catalog/ext/modules/payment/paypal/express.php, I have changed if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') { $paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&'; } else { $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&'; } to: if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') { $paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&'; } else { $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&'; } and there is no change. The customer is still taken to the desktop page. 2) Is there a way to check the user's display size, and direct them to the Desktop page if their screen size is larger than some value, and to the Mobile page if their display size is smaller than that value? Thanks! Malcolm Quote
♥mattjt83 Posted June 21, 2014 Posted June 21, 2014 @@ArtcoInc You can try with the following... In catalog/includes/template_top.php after this: <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" /> ADD this: <script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';</script> Then in catalog/ext/modules/payment/paypal/express.php your code could be: if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') { $paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout' . ( ( (isset( $_COOKIE['resolution'] )) && ( (int)$_COOKIE['resolution'] > 960 ) ) ? '&' : '-mobile&' ); } else { $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout' . ( ( (isset( $_COOKIE['resolution'] )) && ( (int)$_COOKIE['resolution'] > 960 ) ) ? '&' : '-mobile&' ); } Haven't tested but it might be a shove in the right direction. Quote Matt
ArtcoInc Posted June 21, 2014 Author Posted June 21, 2014 (edited) I just found this on Paypal's site: Features Not Supported by Express Checkout on Mobile Devices Before implementing Express Checkout on mobile devices, examine the list of features that are not supported. Express Checkout does not support the following features when it runs on mobile devices: SMS security keys for mobile PayPal login, in which buyers can sign up for an extra layer of security with a secure token. Buyers add a one-time secure code to their password or mobile PIN when they log in to PayPal. Buyers can use secure codes from hardware tokens but not from software tokens sent by SMS to the buyer's mobile phone. Forgotten email or password, in which buyers can request their email address or password during checkout, before logging in to PayPal. Parallel payments, which lets buyers pay multiple merchants in a single checkout session. Dynamic images, which lets PayPal update the images on your website for the Checkout With Express Checkout button and PayPal acceptance mark automatically to coincide with PayPal campaigns. Buyer experience enhancements, which lets you offer gift wrap, ask a survey question, or display your customer service number during checkout. Custom payment page styles, which lets you change the overall appearance of the Review your information page with a custom page style or with individual page style characteristics. Instant Update API, which is a callback that sends you the buyer's shipping address during checkout on PayPal and lets you respond with your actual shipping charges and handling charges. International addresses, which lets buyers add international addresses during checkout after logging in to PayPal. Promotional offers, which lets buyers pay with coupons, incentives, and buyer credit. Dynamic currency conversion, which lets you list an item in one currency and then accept payment in a different currency. Keep me logged in, in which buyers remain logged in to PayPal between transactions. In the Paypal Express module in osC, I have the API Instant Update set to True. If I remember correctly, I needed to do this in order to pass the flat rate shipping costs to Paypal. This *may* explain why I have not been able to get the Mobile Express Checkout to work :( So, *IF* this is the reason, is there any way to have Flat Rate shipping *and* use Mobile Express Checkout? Thanks! Malcolm Edited June 21, 2014 by ArtcoInc Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.