Zen Cart Logo
Forums / Addon Payment Modules / Square Payment Module for Zen Cart [Support Thread]

Square Payment Module for Zen Cart [Support Thread]

Sticky

Views: 366,705

Results 41 to 60 of 835
31 Aug 2017, 10:39 PM
#41
maxbodine avatar

maxbodine

New Zenner

Join Date:
Apr 2009
Posts:
60
Plugin Contributions:
0

Square Payment Module for Zen Cart [Support Thread]

dbltoe:

A smooth step for me was to remove the payment method in the admin first. Seemed to hang without doing that.

Do I remove it or just enable it? Thanks for input I am not sure what I am doing.

31 Aug 2017, 10:43 PM
#42
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

Actually, it should say Install or Edit/Remove.

If not yet installed, overwrite it all and then install. If it has an option to remove, do that then overwrite.

31 Aug 2017, 11:48 PM
#43
maxbodine avatar

maxbodine

New Zenner

Join Date:
Apr 2009
Posts:
60
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

okay I removed the square module and followed the steps adding the different pages to the directories. It shows processing in ZC admin. When I test it, it gives me a "communication error" when I submit it. Do I need to delete the app in square and create a new one? Any ideas?

Thanks,

Maxine

1 Sep 2017, 12:45 AM
#44
maxbodine avatar

maxbodine

New Zenner

Join Date:
Apr 2009
Posts:
60
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

I went in Square and it had the option to redo the secret answer, did that. Updated that in ZC admin. Do I need to upload all the files in the upload folder(I have .082 version on server) too or just the ones on the install list? Still get communication error.

Thanks

1 Sep 2017, 5:23 PM
#45
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

dbltoe:

Actually, it should say Install or Edit/Remove.

If not yet installed, overwrite it all and then install. If it has an option to remove, do that then overwrite.
The second sentence could have been better in it's explanation.

You have the mod on your site.

In the Admin >> Modules >> Payment menu, click the circled I next to Square.
If it shows the install button, do nothing.
If it shows two buttons -- edit and remove -- click on remove and follow the instructions.
Obtain a fresh copy of the latest Square Mod
Use an FTP program to upload the fresh copy - Overwrite all files so you don't miss anything.
Go back to Admin >> Modules >> Payment and click the circled I next to Square.
Click on Install and follow the directions.

Remember most attempts at creating a shortcut actually take you miles out of your way.

3 Sep 2017, 12:12 PM
#46
royal avatar

royal

Zen Follower

Join Date:
Jun 2008
Location:
Canada
Posts:
261
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

Thank you, DrByte!
P.S. I just send you something.

8 Sep 2017, 12:54 PM
#47
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

I just installed this plugin and this may be a dumb question but how do I retreive the whole credit card number?
I did a test order on our site and I just get the last 8 numbers in the Admin panel with the order.

8 Sep 2017, 1:17 PM
#48
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Square Payment Module for Zen Cart [Support Thread]

Maynards:

I just installed this plugin and this may be a dumb question but how do I retreive the whole credit card number?
I did a test order on our site and I just get the last 8 numbers in the Admin panel with the order.
The idea is that you never get to see the entire card number, and that you stop processing cards manually at all. Square is an online processing service, and they are the only ones who ever see the card data, and they process it immediately. That way your store doesn't have to account for specialized very expensive security for secure card handling.

8 Sep 2017, 1:17 PM
#49
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

Does this plugin automatically process the card without me processing manually like I had to with the Ceon Payment module?

8 Sep 2017, 1:20 PM
#50
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

DrByte:

The idea is that you never get to see the entire card number, and that you stop processing cards manually at all. Square is an online processing service, and they are the only ones who ever see the card data, and they process it immediately. That way your store doesn't have to account for specialized very expensive security for secure card handling.

Look like you beat me to my answer.

So it looks like I just bought something from my website and I should see the payment on my credit card.

8 Sep 2017, 2:01 PM
#51
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

This is such a great plugin. I can't believe how easy it was for me to add it to my site with my limited knowledge of how payment plugins work. Extremely handier than my old processing way.

11 Sep 2017, 12:31 AM
#52
northfur avatar

northfur

New Zenner

Join Date:
Jan 2015
Location:
On, Canada
Posts:
40
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

I'm getting this error:

"We could not initiate your transaction because of a problem with the card data you entered. Please correct the card data, or report this error to the Store Owner: SQ-NONCE-FAILURE"

It's installed in the proper folders, and token is set up, but I can't figure out this error. It might be Java Script errors from my template that was explained on page 1 and 2, but I'm unsure where to start looking.Attachment 17293

11 Sep 2017, 12:41 AM
#53
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Square Payment Module for Zen Cart [Support Thread]

Yes, those javascript errors will prevent the page's javascript from operating properly, including the payment portion.

It looks like all the javascript-validation logic on your page has been altered to inject a bunch of button and aria and other code which also uses double-quotes that are conflicting with the double-quotes used to display validation messages. You've probably injected all this extra HTML into your language files.

ie:```
alert("<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>This form has already been submitted. Please press OK and wait for this process to be completed.");

11 Sep 2017, 1:17 AM
#54
northfur avatar

northfur

New Zenner

Join Date:
Jan 2015
Location:
On, Canada
Posts:
40
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

The template I've been using is the Shopfast zencart theme for 1.5.4
I guess they programmed it pretty crapily -_-

19 Oct 2017, 5:33 PM
#55
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

Anyone had a go with the addition of Apple Pay? https://medium.com/square-corner-blo...s-1f85cb6fe433

It appears that the two javascript files used are combined into jscript_square.php file. My attempt at adding the required info resulted in messing up the form.

I changed jscript_square.php to```
<?php/**

  • Javascript to prep functionality for Square payment module
  • @package square
  • @copyright Copyright 2003-2017 Zen Cart Development Team
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: Author: Chris Brown [email protected] New in v1.5.6 $
    */
    if (!defined(MODULE_PAYMENT_SQUARE_STATUS) || MODULE_PAYMENT_SQUARE_STATUS != 'True' || (!defined('MODULE_PAYMENT_SQUARE_APPLICATION_ID') || MODULE_PAYMENT_SQUARE_ACCESS_TOKEN == '')) {
    return false;
    }
    ?>
<script type="text/javascript" src="https://js.squareup.com/v2/paymentform"></script> <script type="text/javascript"> var cardNonce; var paymentForm = new SqPaymentForm({ // locationId: locationId // applicationId: '<?php echo MODULE_PAYMENT_SQUARE_APPLICATION_ID; ?>', inputClass: 'paymentInput', inputStyles: [ { fontSize: '14px', padding: '7px 12px', backgroundColor: "white" } ], cardNumber: { elementId: 'square_cc-number', placeholder: '•••• •••• •••• ••••' }, cvv: { elementId: 'square_cc-cvv', placeholder: 'CVV' }, expirationDate: { elementId: 'square_cc-expires', placeholder: 'MM/YY' }, postalCode: { elementId: 'square_cc-postcode', placeholder: '11111' }, callbacks: { cardNonceResponseReceived: function (errors, nonce, cardData) { if (errors) { console.error("Encountered errors:"); var error_html = "" errors.forEach(function (error) { console.error(' ' + error.message); error_html += "<li> " + error.message + " </li>"; }); document.getElementById('card-errors').innerHTML = '<ul>' + error_html + '</ul>'; $('#paymentSubmitButton').disabled = false; } else { // success $('#paymentSubmitButton').disabled = true; $("#card-errors").empty() document.getElementById('card-nonce').value = nonce; document.getElementById('card-type').value = cardData.card_brand; document.getElementById('card-four').value = cardData.last_4; document.getElementById('card-exp').value = ('0'+cardData.exp_month.toString()).substr(-2) + cardData.exp_year.toString().substr(-2); document.getElementsByName('checkout_payment')[0].submit(); } }, unsupportedBrowserDetected: function () { document.getElementById('card-errors').innerHTML = '<p class="error alert">This browser is not supported for Square Payments. Please contact us to let us know! Meanwhile, please pay using an alternate method; or shop using a different browser such as FireFox or Chrome.</p>'; paymentForm.destroy(); }, inputEventReceived: function (inputEvent) { switch (inputEvent.eventType) { case 'focusClassAdded': methodSelect('pmt-square'); break; case 'cardBrandChanged': document.getElementById('sq-card-brand').innerHTML = inputEvent.cardBrand; break; } }, methodsSupported: function (methods) { if (methods.applePay === true) { // Show apple pay button var element = document.getElementById('sq-apple-pay'); element.style.display = 'inline-block'; } } paymentFormLoaded: function () { paymentForm.setPostalCode('<?php echo $order->billing['postcode']; ?>'); } } }); createPaymentRequest: function () { return { requestShippingAddress: true, currencyCode: "USD", countryCode: "US", total: { label: "{{ MERCHANT NAME }}", amount: "100.00", pending: false, }, lineItems: [ { label: "Subtotal", amount: "80.00", pending: false, }, { label: "Shipping", amount: "0.00", pending: true, }, { label: "Tax", amount: "10.00", pending: false, } ] }; }; // ... $(function () { $.ajaxSetup({ headers: {"X-CSRFToken": "<?php echo $_SESSION['securityToken']; ?>"} }); $('form[name="checkout_payment"]').submit(function(e) { if($('#pmt-square').is(':checked') || this['payment'].value == 'square' || document.getElementById('pmt-square').checked == true) { e.preventDefault(); paymentForm.requestCardNonce(); } }); }); </script> <style> .paymentInput {display:inline;font-size:1em;margin:0 0.1em 10px 0;height:35px;padding-left:5px;width:50%;} .paymentInput {background-color: white;border:3px solid #ccc;} .paymentInput--error {color: red; border-color: red;} </style>

[COLOR=#3E3E3E]

24 Oct 2017, 7:11 PM
#56
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

I would have thought that someone would be interested in adding the ability to accept apple pay to this mod.
:(

3 Nov 2017, 6:48 PM
#57
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

Very excited to try this module. However, I'm getting stuck at the very beginning. The instructions in the plug-in say:

  1. Click to create a New Application for your Zen Cart store to access. Give it a name, such as "Webstore", and click Create at the bottom of the page.
    Maybe I'm dense but I can't find anywhere in my Square account under "apps" where I can create a "New Application." Any clues for this are greatly appreciated. Will also check in Square's help too but since these directions came from ZenCart, I thought I'd start here.
3 Nov 2017, 6:53 PM
#58
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,675
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

earmsby:

Very excited to try this module. However, I'm getting stuck at the very beginning. The instructions in the plug-in say:

  1. Click to create a New Application for your Zen Cart store to access. Give it a name, such as "Webstore", and click Create at the bottom of the page.

Maybe I'm dense but I can't find anywhere in my Square account under "apps" where I can create a "New Application." Any clues for this are greatly appreciated. Will also check in Square's help too but since these directions came from ZenCart, I thought I'd start here.

Earmsby,

  1. Login to your Squareup account.
  2. On your left click on apps.
  3. You should see "My Apps"
  4. There you should able to find a button "Create New Application".

More info at Square Payment Module

3 Nov 2017, 6:56 PM
#59
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Square Payment Module for Zen Cart [Support Thread]

They apparently don't use legacy links at Square. You might try logging in and then going to https://connect.squareup.com/apps. That should show any apps you have going and the link for creating an app.

3 Nov 2017, 7:00 PM
#60
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: Square Payment Module for Zen Cart [Support Thread]

wmorris:

Earmsby,

  1. Login to your Squareup account.
  2. On your left click on apps.
  3. You should see "My Apps"
  4. There you should able to find a button "Create New Application".

This is what I was doing, but I just noticed the small difference in the link on the Square payment module page. It wasn't my regular Square/apps page but the subdomain of "connect" made the difference. There was probably some other way to get to this directly in the Square account but actually following the direction carefully was all I needed in this case. :P