Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 PayPal v2 Setup and Tweaks
Author « Topic »  

pauld
Advanced Member

USA
475 Posts

Posted - 10/22/2023 :  09:45:37  
Configuring on our sandbox the new PayPal v2 checkout with PayPal Advanced, using the "Get Started" button on the Payment Providers screen, seemed remarkably easy.

When we linked to our existing PayPal business account, the PayPal dialog boxes required us to confirm a lot of points about our business - including our product categories, monthly sales revenue, support email and telephone, business legal address, executive DOB and SSN, home address, executive's business ownership percentage, and whether we want added-cost chargeback protection.

A few minutes after completing the setup, we got an email from PayPal with the subject "Your application for advanced debit and credit card payments is approved".

1. Am I right that our most foolproof way to move the new PayPal v2 checkout onto our production site will be to copy over the settings from the sandbox that are now populated in PayPal Checkout (including Client ID, Password, Merchant ID, Transaction Type, and so on)?

2. Our store has a lot of customers who rarely buy online, and we're hoping to reduce any potential confusion with the new checkout.

On typical hardware store checkouts (like the Home Depot example below), there's a prominent separator (in this case "---------- Or ----------") to show that PayPal and payment card checkouts are separate processes for the buyer to choose.

On the payment screen of our v2 checkout with PayPal Advanced, the various PayPal (/ Credit / Venmo) buttons appear so close to the payment card fields below that it seems possible to confuse some buyers.

Is there a simple way to add a separator (like the "---------- Or ----------" Home Depot example) between the PayPal button(s) and the primary payment card checkout below?

Or, can anyone suggest another way reduce possible confusion?

Thanks in advance for any suggestions on this.


Edited by - pauld on 10/23/2023 06:01:44

Vince
Administrator

42690 Posts

Posted - 10/23/2023 :  23:39:49  
Hi Pauld
quote:
1. Am I right that our most foolproof way to move the new PayPal v2 checkout onto our production site will be to copy over the settings from the sandbox that are now populated in PayPal Checkout (including Client ID, Password, Merchant ID, Transaction Type, and so on)?
I would have thought that as you have already agreed to everything you need to agree to, if you run through the wizard again you should just sail through. There are webhook URL's that are set up in the process that are relative to the site you sign up from, so I really think it's best to go through the process again.
quote:
Is there a simple way to add a separator (like the "---------- Or ----------" Home Depot example) between the PayPal button(s) and the primary payment card checkout below?
As it happens I don't think there is. In the Home Depot example it seems this is the first checkout page where you have a choice between the PayPal Express checkout flow or the alternative flow. In your site you have already chosen PayPal and this is their widget that is controlling the layout there. But you could maybe change the text on that button if you think that would help by setting maybe...
$xxCOTxt3='Pay with Card';
...or something like that?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

pauld
Advanced Member

USA
475 Posts

Posted - 10/29/2023 :  09:40:53  
Vince, thanks for this.

Given that the "Name on Card" text is from line 673 of inccart.php, it seems like it could be possible (but maybe not smart) to edit this text.

Am I right that the only way to change the appearance to something like the mock-up below would be to modify inccart.php in a way that will potentially cause other problems and get overwritten with future updates?

dbdave
ECT Moderator

USA
10385 Posts

Posted - 10/29/2023 :  10:40:01  
Hi Paul, see if there is a class (or even better an ID) assigned to that text, or it's parent, and if so, I can setup some javascript for your cart page that would not call for any edits to the back end file(s).
Thanks,
David

pauld
Advanced Member

USA
475 Posts

Posted - 10/30/2023 :  05:35:11  
Dave, thanks for your post.

That code, starting at line 670 of inccart.php, is below.

It looks like we have label "card-holder-name" in form "card-form" in div class "card_container".

The bigger question may be: am I overthinking this?

Does it seem like a separator between the PayPal button and the payment card form below will help to minimize confusion? Or is this unnecessary?

I'd be grateful for any comments on this.


<div class="card_container">
<form id="card-form">
<div>
<label for="card-holder-name">Name on Card</label>
<input type="text" id="card-holder-name" name="card-holder-name" class="card-holder-name" autocomplete="off" placeholder="card holder name" value="<?php print htmlspecials(trim_($GLOBALS['ordName'].' '.$GLOBALS['ordLastName']))?>">
</div>
<div>
<label for="card-number">Card Number</label><div id="card-number" class="card_field"></div>
</div>
<div style="width:50%;display:inline-block;padding-right: 10px;box-sizing:border-box">
<label for="expiration-date">Expiration Date</label>
<div id="expiration-date" class="card_field"></div>
</div><div style="width:50%;display:inline-block">
<label for="cvv">CVV</label><div id="cvv" class="card_field"></div>
</div>
<div style="text-align:center;margin-top:20px">
<button value="submit" id="submit" class="ectbutton widecheckout3">Pay</button>
</div>
</form>
</div>

dbdave
ECT Moderator

USA
10385 Posts

Posted - 11/02/2023 :  15:59:08  
Hi Paul, I think I may be able to do something with this - <div class="card_container">, but before doing anything, I am more interested in the source of the cart page and the output (html) shown in that area.
Sorry I didn't respond sooner, but I didn't see your reply, so I've subscribed to this thread now, so when you reply, I'll get an email.

Thanks,
David

pauld
Advanced Member

USA
475 Posts

Posted - 11/08/2023 :  11:38:09  
Dave, the source of that cart text is \vsadmin\inc\inccart.php

Still trying to determine if that "---------OR---------" separator is needed to reduce buyer confusion - or perhaps I'm overthinking this.

dbdave
ECT Moderator

USA
10385 Posts

Posted - 11/08/2023 :  12:27:46  
Hi Paul, I apologize if I'm not clear on what I need.
On the cart page where that is showing, I want to right click and view the source of that page.
Is this the clog hog site?
I can go take a look myself if so.

I'm pretty sure I can work something out that would not require any edits to the (back end) code.

Thanks,
David

pauld
Advanced Member

USA
475 Posts

Posted - 11/08/2023 :  12:31:48  
Dave, we've got that PayPal v2 checkout on our sandbox site.

I'll message you for your IP address so that I can make the site accessible to you.

pauld
Advanced Member

USA
475 Posts

Posted - 11/14/2023 :  13:52:01  
Here's the code that dbdave provided, to be inserted on cart.php before the closing </body> tag:

<!-- Begin checkout text addition by dbDave -->
<div style="display:none;text-align:center;" id="payspacer">
<span style="font-weight:300;">———— Or ————</span><br>
</div>
<script>
if (document.getElementById("paypal-button")) {
const addspacer = document.getElementById("payspacer").innerHTML;
document.getElementById("paypal-button").insertAdjacentHTML("afterend",addspacer);
}
</script>
<!-- End checkout text addition by dbDave -->


A screen shot of the results, which closely mimics the Home Depot example, is below.

Thanks for this, Dave!






Edited to add:

If desired, dbdave's code makes it easy to insert an HTML <img> tag with payment cards under the "---Or---" text, like the example below.





Edited by - pauld on 11/15/2023 09:44:36

dbdave
ECT Moderator

USA
10385 Posts

Posted - 11/14/2023 :  15:17:09  
No worries Paul.
Javascript is your friend in situations like these.
Updater proof is always better.

Thanks,
David

pauld
Advanced Member

USA
475 Posts

Posted - 12/06/2023 :  13:24:01  
Today we enabled PayPal v2 checkout on our production site. The new v2 checkout seems like a nice improvement.

Our PayPal checkout is configured with "Transaction Type: Authorization," which is unusual.

Following the v2 ugrade, in the Admin Orders page when we attempted to capture orders that were placed before the v2 upgrade, we got a "paypal username / pw not set for express checkout" error.

For these orders we logged into PayPal and captured there. The Admin Orders page then reflected the captured status without further action, and PayPal Shipping worked as expected.

This is just FYI, in case others with "Transaction Type: Authorization" encounter this temporary glitch with any uncaptured orders after the upgrade.

Vince
Administrator

42690 Posts

Posted - 12/07/2023 :  09:46:42  
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000