Also, what is odd is Order Notes indicate the correct total was submitted.
“Square Capture of $17.55 Approved”
http://willowpondbakery.com
Plugin Support
John Coy a11n
(@johndcoy)
Automattic Happiness Engineer
Hi @fermenator
Discounts applied to the WooCommerce checkout using coupons will show within the transaction details in Squareup.com. The issue is likely with the plugin that calculates the cost by weight.
Does the problem affect any other product that doesn’t use the same pricing model?
I calculate the amount to increase or decrease the order manually, so it isn’t in a plug-in. If I owed the customer a credit, I would issue a coupon code for the delta, and apply it to the order. If the customer owed me more, I would add a “fee”.
This being said, I found a new plugin that allows for float quantities, so I can update the quantity directly without calculating the delta anymore. I haven’t tested the payment process yet, but I would expect that it should process fine now. I have a dev account on squares site, so when I get a chance to test I’ll report back my findings.
So, the coupon and fee were native woocommerce objects, not the result of a plugin. Switching to float quantities negates the need to manually adjust the order at all using coupons and fees.
I just tested it again. I enabled the woocommerce square plugin, turned on the sandbox mode and submitted an order. I ordered two widgets. I have the site setup to capture authorization only. I reviewed the order, and “corrected” the order by removing one of the widgets from the order. I saved the order, and then captured the charges. The Woocommerce screen correctly indicate a charge for ONE widget. However, when I went to the Square sandbox, I can see that the original charge for TWO widgets was submitted. Something is still wrong.
The basic use case is this:
1. Authorization only
2. Apply update to order
a. Add an item
b. Remove an item
c. Add a Fee
d. Add a Discount (Coupon)
3. Capture payment
So far, I haven’t been able to get these to work. I can’t enable this plugin until I have rock-solid assurances that the charges submitted over the payment gateway matches that of the order at the time the capture was done. Something is clearly not getting updated, so the amended charges are not being sent over the gateway.
This might be helpful, but I can see that message sent by WooCommerce to Square included this. On this order, I had increased the quantity from 1 widget to 12 widgets, but WooCommerce Square still only sent one widget. The cost of one widget is 507.
05-15-2020 @ 19:16:20 – Request
method:
uri: chargeWithHttpInfo/3JV5D0CFC3WRV
user-agent: WooCommerce-Square/2.1.5 (WooCommerce/4.1.0; WordPress/5.4.1)
headers: Array
(
)
body: {
“idempotency_key”: “XXXXXXXXXXXXXXXXXX:236”,
“amount_money”: {
“amount”: 507,
“currency”: “USD”
},
“card_nonce”: “cnon:XXXXXXXXXXXXXXXXXX”,
“delay_capture”: true,
“reference_id”: “236”,
“note”: “XXXXXXXXXXXXXXXXXX – Order 236”,
“customer_id”: “XXXXXXXXXXXXXXXXXX”,
“billing_address”: {
“address_line_1”: “XXXXXXXXXXXXXXXXXX”,
“address_line_2”: “”,
“locality”: “XXXXXXXXXXXXXXXXXX”,
“administrative_district_level_1”: “XXXXXXXXXXXXXXXXXX”,
“postal_code”: “XXXXXXXXXXXXXXXXXX”,
“country”: “US”,
“first_name”: “XXXXXXXXXXXXXXXXXX”,
“last_name”: “XXXXXXXXXXXXXXXXXX”,
“organization”: “”
},
“shipping_address”: {
“address_line_1”: “XXXXXXXXXXXXXXXXXX”,
“address_line_2”: “”,
“locality”: “XXXXXXXXXXXXXXXXXX”,
“administrative_district_level_1”: “XXXXXXXXXXXXXXXXXX”,
“postal_code”: “XXXXXXXXXXXXXXXXXX”,
“country”: “US”,
“first_name”: “XXXXXXXXXXXXXXXXXX”,
“last_name”: “XXXXXXXXXXXXXXXXXX”
},
“buyer_email_address”: “XXXXXXXXXXXXXXXXXX”,
“order_id”: “XXXXXXXXXXXXXXXXXX”,
“verification_token”: “verf:XXXXXXXXXXXXXXXXXX”
}
duration: 0.68656s
It would look like the value of amount_money must not be getting updated.
public function getAmountMoney()
{ return $this->amount_money;
}
/**
* Sets amount_money
* @param \SquareConnect\Model\Money $amount_money The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of currency must match the currency associated with the business that is charging the card.
Hi there @fermenator,
The behaviour you described is already reported to our developers – authorized (not captured) transaction amount cannot be changed. We have also added it to our docs here: https://docs.woocommerce.com/document/woocommerce-square/#section-12
The culprit is that Square API doesn’t allow partial capture (this endpoint doesn’t have adjustment parameters). But it is confusing indeed that order notes show the updated amount, but the captured amount is the same.
Our developers will look into updating the workflow so that users are fully aware that changing the captured amount won’t work and will remove the confusing bits.
Please keep an eye on the plugin’s updates and changelog for bug fixes.
Meanwhile, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Enjoy the rest of your day and stay safe!
This begs one parting question. Is there a way to accept an order without authorization up front? I could then make necessary updates, and submit for authorization then.