API Voiding a delay_capture=true Charge - square-connect

I did a Charge with delay_capture=true. The response has card status as "AUTHORIZED" as expected.
I then Voided the transaction. I posted to
https://connect.squareup.com/v2/locations/[location id]/transactions/[transaction id]/void
with the headers
Authorization: Bearer [live access token]
Accept: application/json
Content-Type:application/json
and received the reply
{}
as expected.
If I do a Retrieve Transaction on the one I voided through the API, it does show status as "VOIDED"
In the dashboard it doesn't show any Voids, nor does it show the Transaction. Is that to be expected?
However, on my credit card statement, the amount still shows as "Pending."
Does voiding a transaction not get sent to the credit card company so the Pending charge is removed?
My concern is it showing on the credit card statement.

You are correct the voided transaction will not show in the Transaction section of the online Dashboard.
It will show in the Transaction Status report on your Square Dashboard. The Transactions Status shows information about uncompleted transactions. This includes canceled, declined, expired Offline Mode, and uncompleted transactions in which a customer’s card was swiped (or manually entered) but not successfully charged.
Additionally this void charge should disappear from your statement within a few business days.

Related

Power Automate: How will workflow know if item status changed while waiting for teams approval

So I have an SPFX application that is used to raise request, modify request, approve / reject. The usual request workflow. all these data are being saved in Azure SQL table. Now I have a workflow that runs on db item update trigger, it would start a teams "wait for approval" action and be sent to 2 approvers (1 for main and 1 for a backup approver, either of the two can approve and workflow would only wait for the first response). at the same time, approvers can also approve the request via the spfx app. they can approve it because the status of the request is "Pending Approval".
Now my issue is this: If the approver decides to approve the request from the SPFX app, db item's status would then change to Approve, However the request's teams approval is still "Requested"" in the teams.
I created a workaround for this by checking the request's status from the db so if the item is "Approved", doesn't matter what action the approver did in the teams approval, if the request is already approved or rejected in the db, the action made in the teams will not do anything.
BUT what if that backup approver, decides to reject the request. it would cause confusion because data would then be "Approved" in the database.
would it be possible to check the status, and then cancel the triggered teams approval for that request?
I hope I described the scenario well.

Plaid transactions unavailable 2 minutes after a user connects their bank account (PRODUCT_NOT_READY)

I'm currently accessing user's plaid bank transactions using this approach:
User connects to plaid through the plaid web/iframe component
2 minutes later POST /accounts/balance/get is called, which returns a list of bank account ids (account_ids)
The transactions for the bank accounts retrieved in 2. are requested using POST transactions/get
transaction/get then gives the following error: PRODUCT_NOT_READY : the requested product is not yet ready. please provide a webhook or try the request again later
What I'm unclear on is how to trigger plaid to start pulling transactions. The documentation mentions that 30 days of transactions are available after ~10 seconds of "connecting an item to link". Is the user connecting to plaid through the iframe considered connecting to link (since it calls POST /link/item/create)? Ideally I can get access to the transactions without having to use webhooks.
Thanks!
Did you make sure to initialize Link with the transactions product in your call to /link/token/create? That would be the most likely source of the error -- the Item won't start fetching transactions on link unless transactions is specified in the products parameter of the /link/token/create call.

Authorize.Net Direct Post for Magento - An error occurred while trying to report this transaction to the merchant

Authorize.Net Direct Post for Magento
Getting below error.
An error occurred while trying to report this transaction to the
merchant. An e-mail has been sent to the merchant informing them of
the error. The following is the result of the attempt to charge your
credit card.
This transaction has been approved.
It is advisable for you to contact the merchant to verify that you
will receive the product or service.
This means the relay response URL used by Magento/your website is not returning a successful response to Authorize.Net in time (5 seconds). As a result Authorize.Net is assuming the page is not functioning and displaying that message.
You need to verify that the URL you provided is correct, reachable from outside your network, and responding in less than five seconds.

How do I trigger a webhook for transaction settlement in sandbox?

I am trying to create a new webhook endpoint for my braintree integration. I added an endpoint to the Control Panel. I am using the Python library and created a a bunch of transactions. Also, I manually settled the transaction using the testing gateway. But I do not get a webhook notification. When is the webhook triggered and I=is there a way to trigger it manually?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The Transaction -> Disbursed webhook fires when the transaction has settled, and braintree has begun to move funds from their account to yours. While settling the transaction manually in the control panel would start the process, it does not fire the webhook right away.
There isn't any way to trigger this manually, instead braintree has sample payloads and a way to trigger a "Check" webhook in the control panel.
To answer the question in your comment, this type of webhook does not cover voided transactions.
I also asked a similar question to Braintree support, and the answer may be useful for others, even if I decided to go with Stripe (I found stripe much better after all my tests ;).
Question
Hi,
Just integrating Braintree, but can’t find how I’m supposed to get a transaction confirmation (meaning it has correctly been ‘charged’). When I create a ‘transaction.sale’ (including submitForSettlement) I always get (sandbox) a response indicating the status ‘Submitted for settlement’, and the transaction doesn't go to settled until Braintree globally process it (at night, etc.). I also can’t find a related webhook to get payment confirmation (as I currently get using PayPal - IPN).
When/how can I get a payment confirmation so I can then ‘deliver’ the purchased item? By checking your docs, it’s like you can’t get a confirmation until the next day… how does it work exactly?
Thank you!
Answer
Hi Nacho,
Thanks for reaching out!
A Braintree transaction goes through several steps, the second of which is submitted for settlement. This means that the money has begun to move from the customers account, and is the immediate state of a transaction after being submitted; it's not possible to get an immediate 'settled' or 'complete' status on submission. Transactions in this state will generally move to settling, then settled, within 24 hours, although it can depend on your processing bank.
It is very unusual for a transaction to fail when moving from submitted for settlement to settled, as the amount will have been authorised prior to submission for settlement. Authorising a transaction means the funds are put on hold within the customers account, for a certain timeframe depending on payment method, until they are settled. We get an immediate response from the processing bank as to whether an authorisation is successful, which you'll see in the Braintree_Transaction response object.
As such, you can generally rely on the status of submitted for settlement to reflect a valid, successful transaction.
We don't offer webhooks for transactions - instead, our API is designed to give instant feedback via the response object. Because of this, we only provide webhooks for asynchronous events that aren't triggered by an API call (such as billing a subscription or disbursing funds). We encourage our customers to avail of our API responses, in addition to our reporting system and comprehensive search call options, for any extra functionality they require.
If you wanted to pull updated statuses for transactions, such as to confirm a payment has settled, you could use the Transaction.find() API request, pass in the transaction ID and read in the status from the response object. This could easily be run as a script that iterates through the previous days transaction IDs and updates the status of each on a daily basis.
I hope this explains the transaction process with more clarity and offers you some options!
Kind regards,
Braintree
Just in case it helps!
I also asked kind of the same question to Braintree I got the same answer to check the transaction with Transaction::find() and then asked about the possibility of having a transaction not settled after having a SUBMITTED_FOR_SETTLEMENT status, here is the response, very clear and complete:
Hi Alban,
Thanks for reaching out with this question! Happy to help.
Settlement Declined:
In rare cases, a transaction that has been submitted for settlement will reach a status of settlement declined. For sales, this will only occur with a PayPal transaction. For refunds, this can occur with both PayPal and credit card transactions.
This occurs if the processor declined to settle the sale or refund request, and the result is unsuccessful. This can happen for a number of reasons, but the processor settlement response code may have more information about why the transaction was declined. Again, this status is rare, and only certain types of transactions can be affected.
PayPal sale: We recommend checking the settlement status of all PayPal sale transactions before shipping goods or providing services to customers. To reduce these types of declines, submit your PayPal transactions for settlement either upon creation or within 3 days of creation.
PayPal refund: We recommend contacting PayPal for details on refunds that are Settlement Declined.
Credit card refund: Settlement declines can be hard or soft, just as with authorizations. In regions that support an immediate decline response for refunds, we will return Settlement Declined if the processor responds with a hard decline.
Settlement Pending:
This status indicates that the transaction has not yet fully settled. This status is rare, and it does not always indicate a problem with settlement. Only certain types of transactions can be affected.
--> PayPal sale:
If using multiple partial settlements: Settlement Pending is a normal part of the transaction flow. The parent authorization will remain in this status until all child transactions are settled or the authorization expires. See the multiple partial settlement reference for more details.
If not using multiple partial settlements: Almost all Settlement Pending PayPal transactions will settle without intervention, so we always return a successful result. In general, you can expect these to be updated to Settled within a few days as we confirm their status with PayPal. In the rare case we can't settle a Settlement Pendingtransaction, we'll contact you to resolve the issue.
--> Credit card, Android Pay, and Apple Pay sales: You will only see Settlement Pendingauthorizations if you have contacted us to enable a specific API feature that uses this status.
I hope that provides insight, Alban! Let us know if further questions arise.
Best,
xxxxx.
Braintree

After a successful Magento payment via SagePay, the customer is redirected to the empty basket page. Why?

As a team we're currently investigating a strange occurrence. It doesn't seem to apply to all orders by any means, but it is affecting a large number of customers based on the logging we've added to the noItems.phtml page.
Please note: I'm not really expecting an answer as I assume this is a problem we have to solve ourselves based on addons, and our server configuration (three servers for loading balancing). However, I am looking for possible ideas and/or whether this is something somebody has come across previously.
What we've done so far, and what we know:
User enters their card details in the SagePay iFrame;
User purchases an item via SagePay -- order is successful;
Some users are sent back to the success page;
Some users don't see the success page (phoned to confirm a handful) but instead return back to the empty basket;
We're still investigating, but we find it ever so strange how a user would return to the empty basket page. We've added logging to the noItems.phtml and we can see that some users are getting assigned another session ID after a successful transaction. This seems to be the problem, but why the user is being assigned another session ID after a SagePay payment isn't easy to comprehend.
Has anybody else experienced a similar issue with SagePay/Magento? And if so, what steps did you take to solve?
Our Sage Pay Support team would be happy to look at the transaction logs (within 72 hours of the transation being submitted) and help you determine the reason for the failed transactions on 0845 111 4455 24/7.
You reply to the Notification URL when you acknowledge receipt of our response. You have 20 seconds to response. You need to send the Status (OK, Error or Invalid), Status Detail and Redirect URL. We then send the shopper back to your Redirect URL.
A few suggestions would be:
If we can't reach your Notification URL, check you have ports 443 and 80 open. Check you don't have a DNS issue.
If you are receiving the notification from Sage Pay to confirm the status of the transaction via the Notification URL. Check the information you are sending is in the correct casing, that it is not empty data and that your website is not spooling and check whether the success/failure URL is a valid landing page.
All our system needs is the Status Deatil, 'Status = ' and 'RedirectURL =' fields with the appropriate values assigned, separated with Carriage-Return and Line-Feeds (as specified in the protocol) . Nothing else is required. The response you send should also be text/plain message, not text/html or any other MIME type.
If the customer is being sent back to an empty basket, check whether your website is doing a job in the background such as writing to a databse, preparing confirmation emails to the back office before sending the customer to the payment page. Test whether your server can handle the amount of transactions coming through from Sage Pay. Or are you truncating the NEXT URL?
Regarding a session ID, each transaction is assigned a unique Sage Pay ID called a VPSTxID which is used to identify the transaction. We can take a look at the transactions you are referring to if you are getting several session IDs to discuss further if you would like.
Sage Pay Support.
Check the action that pushes the user to the success page on successful purchase. Maybe its something like target _parent. Maybe its something where its trying to load the success page in the iframe. Or maybe its timing out on sagepay when trying to redirect.

Resources