Jump to content

PayPal Commerce OK for older versions of Cubecart 6?


jasehead

Recommended Posts

I'm still running Cubecart 6.1.14 and I can't find an easy answer on whether the PayPal Commerce plugin will work OK for that version of Cubecart - does anybody know?

Plugins often say they work with Cubecart v6 but I expect that often implies the later versions of v6 and not from 6.0 and up.

Edited by jasehead
Link to comment
Share on other sites

I will be cautious and say probably not 100%.

Based on seeing that the PayPal Commerce Plugin v1.0.0 is dated 2020-FEB-03, and CC6114 is dated 2018-MAR-07. The version of CC most closely dated to the plugin is CC629 dated 2020-FEB-27.

However, scanning through the /hooks/ files in PayPal Commerce Plugin v1.8.5 (the hook code most likely needs to be more tightly coupled to the core code where the hooks are called), I find that the hooks used go way back to CC5, and looking at the code in those files show nothing that would require any particular version of PHP (there have been changes to make the code operate better under PHP8.1, but no regression problems).

There is a reference for v1.2.1 - Adds T&C's before "Make Payment" button. (Requires CubeCart 6.2.9 and higher using default skin)

Link to comment
Share on other sites

  • 2 months later...

Tried the 1.8.7 PayPal Commerce plugin with CC6.1.14

  • some confirmation/return(?) screens during setup were blank (had to reload and go back through the Manage Plugins) - settings seemed complete and OK
  • main store was blank screen, had to disable PayPal Commerce and return to PayPal Standard

{foreach from=$HEAD_JS item=js}{$js}{/foreach} is definitely in my main.php head tag.

Edited by jasehead
Link to comment
Share on other sites

Please see Github issue #3375.

I would tell you how to fix it, but new security measures implemented on these forums prevent me from posting lines of code.

So, in the file mentioned in the Github issue, find lines 17 and 18.

Remove the leading spaces in front of the script tag and the EOT; statements.

 

Link to comment
Share on other sites

Seems to be working.

In the admin side of the CC6.1.14, my Orders list has a custom Gateway column ($order.gateway). The new gateway shows paypal_commerce, except for one order where the gateway is blank. There is information in the transaction log for that order, and it's showing in my PayPal account OK.

In Cubecart, the phone number in the order shows "Disabled in PayPal" - is this an indication that the customer used Pay in 4?

I still need a phone number for parcel tracking notifications or a secondary contact in case the email address is wrong.

Edited by jasehead
Link to comment
Share on other sites

I am not sure if this is related, but see (I hope these web addresses show -- replace the h??ps with https):

h??ps://forums.cubecart.com/topic/58031-paypal-phone/
h??ps://forums.cubecart.com/topic/58078-customers-phone-numbers-are-corrupting-since-new-update/

 

Link to comment
Share on other sites

Yeah, I had worked out the settings in my PayPal account and have now switched the Customer Phone Number to ON (Optional).  Maybe it needs to be set to required.

It does seem dumb if the customer is required to enter a phone number in CubeCart checkout, but that phone number is overwritten by the PayPal Commerce plugin. Or is the customer skipping CubeCart secure checkout by going early to PayPal Checkout and the information in CubeCart is being fed by PayPal?

(I have a separate issue with phone numbers being corrupted in CC6.1.14 - if a customer enters an international number, eg. +61419123123 and their order gets updated then the number may change to something like 122838246246 because the code is adding the number to itself. I hope that's been fixed in later versions. I've been manually fixing these as I find them because it's easy to divide by 2 (or more) to find the original number - the level of corruption depends on how many times it has been updated.)

Edited by jasehead
Link to comment
Share on other sites

I do not know why the PayPal Commerce module accepts the customer's PayPal data and overwrites existing CubeCart's customer data. It's not a bug.

As for the missing gateway data item in the Orders list, having brought that order up for editing, is it also missing on that order's Overview tab? Is it also missing on that order's Transaction Logs tab?

 

Link to comment
Share on other sites

On the Overview tab, at the bottom, there is a Shipping Information -- which also includes the payment gateway. (At least CC652 does - I haven't checked what CC6114 shows.)

Shows in the Transaction Logs tab.

That points to a problem (yet to see if it has been fixed) in the Order class, as opposed to a problem in the PayPal module - whether it be PayPal Standard or PayPal Commerce.

How long ago did this particular order happen? Today? Last month? Last year?

Link to comment
Share on other sites

Yes, shipping information. I likely changed a lot of the language files long ago. We don't send any parcels by ship.

It was the one order that also had "Disabled in PayPal" as the phone number. We have had two other orders with PayPal Commerce. Just implemented the plugin in the last 2 days. The order in question was #2 of 3, so we're getting normal results as well - but there are different ways a customer can place their order with this gateway.

Edit: Have since had other PayPal Commerce orders with no gateway info, but all now have phone numbers (all international format but no plus at the start). Also receiving orders with gateway info, so I suspect the blank gateway issue may depend on whether the customer is using a Buy Now PayPal button or working their way through the Secure Checkout in CubeCart.

Edited by jasehead
Link to comment
Share on other sites

Does an IPN need to be set up in my PayPal settings for PayPal Commerce? I can see an old IPN in PayPal is set up for modules/gateway/PayPal/ipn.php - this may be a relic in my PayPal settings from an older version of CubeCart as far back as v3.

Update:  Searched forums and changed PayPal IPN to .../index.php?_g=rm&type=gateway&cmd=call&module=PayPal

Edited by jasehead
Link to comment
Share on other sites

I had an instance of one customer submitting a duplicate order via PayPal Commerce within moments of the first order, and in CubeCart I could see a blank gateway and paypal_commerce (comparing the order numbers is looks like only 7 seconds later, so not enough time to enter new payment information?).  Both orders were processed and PayPal collected the payments.  I manually refunded the second order.  IDs are replaced with xxx in the examples shown below.

First Order# 231103-160525-7896 - blank gateway shown in CubeCart:
(info in PayPal)
Gross$37.90 AUD
PayPal fee-$1.29 AUD <--  different fee to second order, see below
Net total$36.61 AUD

Transaction Logs

Transaction ID Status Amount Gateway Date/Time Notes
xxx Completed $37.90 PayPal Today, 16:07 Payment successful. 
Address: confirmed
Payer Status: unverified This Transaction ID has been processed before. Recipient account didn't match specified PayPal account.
xxx COMPLETED $37.90 PayPal Commerce Today, 16:06 Payment completed for AUD 37.9 AUD
xxx COMPLETED $37.90 PayPal Commerce Today, 16:05 Seller Protection: ELIGIBLE
Settlement Mode: Capture
PayerID: xxx

 

Second Order# 231103-160532-9624 - paypal_commerce gateway shown in CubeCart:
(info in PayPal)
Gross$37.90 AUD
PayPal fee-$0.96 AUD <-- different fee because of card payment? Then how was the first order different if only 7 seconds apart?
Net total$36.94 AUD

Also included card and the processor response details (not shown in the first order):
Card type: VISA
Address Verification Service (AVS): U
CVV: Match
Authentication status 3DS: Y- Cardholder enrolled
ECI 3DS: 5- Cardholder authenticated by the issuer
ECI Submitted 3DS: 05- Cardholder authenticated by the issuer

Transaction Logs

Transaction ID Status Amount Gateway Date/Time Notes
xxx Refunded $37.90 PayPal Today, 21:57 You, the merchant, refunded the payment. This Transaction ID has been processed before. Recipient account didn't match specified PayPal account.
xxx Completed $37.90 PayPal Today, 16:09 Payment successful. 
Address: unconfirmed
Payer Status: unverified This Transaction ID has been processed before. Recipient account didn't match specified PayPal account.
xxx COMPLETED $37.90 PayPal Commerce Today, 16:07 Payment completed for AUD 37.9 AUD
xxx COMPLETED $37.90 PayPal Commerce Today, 16:07 Seller Protection: NOT_ELIGIBLE
Settlement Mode: Capture
Payment Method: Card
liabilityShifted: true
authenticationStatus: YES
authenticationReason: ERROR
Edited by jasehead
Link to comment
Share on other sites

Orders

 
Order Number
 
Customer
Gateway
Status
Date
Total
 
231103-182455-8318 Ms M M-P paypal_commerce Processing Today, 18:24 $33.90   
231103-172004-2229 Mrs J B Card_Capture Processing Today, 17:20 $44.90   
231103-160532-9624 L J paypal_commerce Cancelled Today, 16:05 $37.90   
231103-160525-7896 L J   Processing Today, 16:05 $37.90   
231103-121946-2995 Dr N R paypal_commerce Processing Today, 12:19 $15.51   
231103-050647-7344 J L paypal_commerce Processing Today, 05:06 $51.43   
231103-001054-8764 R P   Processing Today, 00:10 $36.90   
231103-000326-9144 R P   Processing Today, 00:03 $43.90   
231102-223011-5478 R S   Processing Yesterday, 22:30 $37.90   
231102-182734-8990 F V   Processing Yesterday, 18:27 $33.90   
231102-152831-1280 Ms J V N C PayPal Processing Yesterday, 15:28 $51.90   
231102-141655-3744 T W   Processing Yesterday, 14:16 $51.90   
231102-130545-7361 Mrs F B Card_Capture Order Complete Yesterday, 13:05 $39.40   
231102-115254-6062 Mr R T Card_Capture Order Complete Yesterday, 11:52 $37.90   
231101-213219-9727 K W   Order Complete Nov 01 2023, 21:32 pm $85.85   
231101-210216-8780 Ms C W paypal_commerce Order Complete Nov 01 2023, 21:02 pm $37.90   
231101-200803-4564 A O   Order Complete Nov 01 2023, 20:08 pm $40.90   
231101-195315-4301 mrs C R PayPal Order Complete Nov 01 2023, 19:53 pm $42.83   
231101-193420-1939 M H   Order Complete Nov 01 2023, 19:34 pm $33.90   
231101-190934-6652 V A paypal_commerce Order Complete Nov 01 2023, 19:09 pm $33.90   

 

Just to show how patchy the paypal_commerce looks (blank gateways). PayPal is the old PayPal Standard, which I was hoping to phase out.

Link to comment
Share on other sites

Not familiar? It is admin, Orders with: no items per page selector, no javascript, no images, no CSS, and added table column showing data from CubeCart_order_summary.gateway field. (Not familiar with the red-colored order number, unless color applied in this post to draw your attention to it.)

 

Edited by bsmither
Link to comment
Share on other sites

The orders list was to show how hit and miss the PayPal Commerce is working - it looks like two different methods.

The orders list is basically the default Admin/Orders screen from 6.1.14 with a column added for gateway (my needs) - also, rich text because I couldn't attach an image. I abbreviated names when posting here for customer privacy, and highlighted the duplicate orders in red so you could see that a blank gateway and the paypal_commerce gateway were both shown for much the same order.

This is the same gateway information in Admin that would be visible if I clicked through to the individual order (except the underscore is removed):

Delivery Information
Delivery Method   By Weight
Delivery Product   Parcel Post
Gateway  paypal commerce

But, if the gateway is blank in my orders list, then the individual order is also missing the whole "Gateway paypal commerce" row.

The customer has since responded to say that she didn't notice, click or do anything differently when she was placing her order and duplicated the payment. So, if it was just  a resubmit after a few seconds then why was it processed and charged differently? And if PayPal Commerce is sometimes charging a higher amount when a lower charge may apply, then isn't this potentially costing CubeCart merchants money?

Edited by jasehead
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
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...