I am trying to add a payment function to the iOS application using the Square POS API.
After "Square POS" payment is completed, I am concerned about the case where I can not receive the callback.
If I could not receive a callback, how can I get a TransactionID?
While it should be rare that something goes wrong when returning to your application, if the need arises, you can find your past transactions using Square's Transactions API. By calling the ListTransactions endpoint, you can see the TransactionID, among many other attributes of the Transaction.
Please see https://docs.connect.squareup.com/api/connect/v2#endpoint-listtransactions for more information.
Related
I want to use the Slack API to aggregate how many times each user in Slack has posted a message in a specific period of time. The conditions are as follows.
Multiple channels are covered
Both public and private channels are covered
So here's what I'd like to ask you;
I've read the official Slack API documentation, and apparently there are no direct API methods suitable for the above kind of aggregation, is that correct?
If the above is correct, I think the only way is to parse the text from the text property, which is the return value of the conversation.history method, and aggregate it, is that correct?
Unfortunately, there is no out-of-the-box method that will enable you to get that exact data. A bot needs to be in a channel if it's going to call conversations.history. You'd need to identify the id of the user[s] and filter through the response payload to get the aggregate number of messages for that user. However, moving forward you can use the Events API with the [messages][2] event type. This way your app will be notified of all messages in a channel in real time.
I am trying to run payments through PayPal in sandbox mode with my .NET CORE 3 project.
The idea is to give the customer ability to choose whether to pay using his/her PayPal account or Credit Card.
I am using the PayPal-NET-SDK v2.0.0-rc2
I am trying to understand whether this is the right order to run things:
Create Payment using PaymentCreateRequest
At this point, I get the approval_url. I redirect the customer and approve the payment/order using Credit Card
Execute payment using PaymentExecuteRequest, using the PAYID and PAYERID I get from the redirect URL. Here I get an order object
Authorize order using OrderAuthorizeRequest with the order id (setting body to a PayPal.v1.Orders.Capture object)
Capture order using OrderCaptureRequest with the order id (setting body to a
PayPal.v1.Payments.Capture object)
Is that a correct execution order?
Rather than the old v1/payments, you should use v2/orders; the v2 SDK can be downloaded here
Rather than an old-style full page redirect to an approval_url , it's much nicer to use the new checkout's in-context UI that keeps your site loaded in the background. Here is a demo pattern. Another benefit is that it gives an embedded/in-line credit card form.
As a finishing touch once you have everything working, don't neglect to
gracefully handle/propagate funding failures back from your server,
so the buyer can choose something else when declined.
If you start out with intent=capture(v2) or sale(v1), the capture(v2)/execution(v1) call will be final and complete the transaction, there will be no authorize step, so (4) on your list is skipable. (You should only bother with implementing something other than intent=capture/sale if you find you have a specific business need for delaying captures, as it adds complexity)
More general information on implementing the server-side portion of the integration: https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/
Is it possible to anonymously programmatically verify that a transaction has reached n number of validations without running a full node? If so, what is the best means to do this?
Basically I want it to build a payment system where after the transfer is initially detected, the customer sees a message thanking them and telling them that their purchase will be processed within 24 hrs and that they'll receive an email once confirmation is complete. Then throughout the day maybe run a cron job that checks that each transaction reaches the desired number of validations and if so divide the money between two wallets and mark the product to be sent. I also don't want it to be with a service like Coinbase or Bitpay where they have control of your coins.
So far I've been experimenting with Blocktrail and mycelium gear. Both have some elements I like but still not everything that I need. With mycelium you can set the number of verifications but for instance if I want to set it for 6 verifications the customer would have to sit there possibly an hour before they see the next screen. Blocktrail allows me to query that a transaction is validated but it only has the ability to check that 1 validation was completed as far as I can tell. Can anyone suggest an API or widget that can accomplish these things? Preferably PHP or if not JQuery.
Blockchain.info has a simple Query API for querying how much bitcoin an address has received. You can add a confirmations=n parameter that will only include bitcoin that has been confirmed 'n' times. It returns a simple value in satoshis.
For example to check how much bitcoin was received with at least 2 confirmations at a specific address you could have your code query the API like this:
https://blockchain.info/q/getreceivedbyaddress/1PFtyX9nQvjP8U2N3iUk2oNorzPfpjX9sK?confirmations=2
We are finding that a number of orders - for some as yet unknown reason - are not automatically captured. Is there a way with the API to get a list of un-captured orders?
You can use TransactionSearch API. TransactionSearch API can help you to list down all the transaction together with the status of the transaction itself. You can specified a date range and also the status of the transaction. Read here for the API details.
Using jsonsdk/DataService/getItemSummaries (which no longer appears in the documentation oddly), I can get a list of all items, accounts, and their balances and error statuses. However, it also returns all transactions for accounts, regardless of dexLevel you set (which seems to do nothing on this call).
The REST API talks about /account/summary/all​ http://developer.yodlee.com/Indy_FinApp/Aggregation_Services_Guide/Aggregation_REST_API_Reference/Account%2F%2FSummary%2F%2FAll but
a) It's completely different than every other call, and returns a completely different data structure.
b) This call returns nothing if you have only one account and it's still in a connecting status (as opposed to the one above, which will show accounts which are still being added/refreshed).
Long story short, what call can we use to return all items and their accounts, but not the transactions?
The getItemSummaries API returns all the data including transactions and hence the data returned is huge and hence we don't want our clients to use this API, so it's been removed from the document. We are working to get a variant to this API which returns all data except transactions depending on the extent levels.
So in the mean time you will need to call getItemSummariesWithoutItemData and once you get the itemIds then you need to call getItemSummaryForItem1 with correct data extent to get details of each Item and then consolidate it.