Score:0

Commerce Square Connect Order Processing

mx flag

I'm working on a patch for the Commerce Square Connect contrib module as described here:

https://www.drupal.org/project/commerce_square/issues/3228232

The patch I've developed provides basic functionality, but it has some issues that I'd like to address. I'm hoping someone who's more familiar with Commerce APIs can point me in the right direction.

The patch doesn't address shipping tax correctly. Right now it incorrectly assumes that shipping adjustments aren't taxable. Is there some function I can call to determine if a shipping adjustment is taxable?

The patch also doesn't handle payments for additional order items properly. Here's the use case:

  1. An order is created, and payment is processed successfully.
  2. The order is edited, and a new item is added to the order.
  3. Payment is submitted for the item that's been added to the order.

The issue here is that the list of processed order items includes all items associated with the order, not just the added item. As a result, the order cost (for all items) and the amount paid (for only the new item) are inconsistent, and Square rejects the payment.

Is there some way to identity a new order item and ignore items that have already been paid for?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.