I am using the public API endpoint
/connect/get
options={"pending":true}
to get the pending transactions for the user, once he is added.
However, I am not getting any pending transactions in the results.
Am i doing something wrong?
Related
So I am working on Mailchimp API & I've two separate accounts for testing the API out. A request to get members works as expected in one account (dc - us6), but the same request throws an internal server error on another account (dc - us21).
Now, this issue can be resolved by removing the parameter which is being passed with no value(since_last_changed), but I was wondering if Mailchimp changes the API frequently in the background or if this is just a once-in-a-while case.
Here is the request I'm using through postman -
{{apiurl}}/lists/{{listid}}/members?$sort_field='last_changed'&sort_dir=DESC&since_last_changed=&count=1000&offset=0
I tried using postman, and below are both accounts' results.
US-6
US-21
We have a Rest API and for each API call we are logging user id, input, response etc for tracing purpose.
When we check the logs, for two requests sent by the same user, trace id and transaction id are same.
Why the transaction and trace id generated for each request is not unique??
I have been following this for reference. I am developing a spring-boot app which will have authenticated users. Once logged in, a user will subscribe to an event by visiting a specific URL.
This spring-boot app will also either support MQTT (or maybe just HTTP requests) in which information for a specific user will be sent. I would like to then display this sent information to the user using web flux/SSE if the user has subscribed.
Many users can be logged in at any given time, and they will have all subscribed to the updates. How do I manage all the different sinks for each logged in user?
I believe it's possible to get the current user when they visit the authenticated URL, but what's a method of storing all of the sinks for each logged in user?
I appreciate it.
You already got the answer in the comment section.
Lets assume that this is the message format you would be publishing.
public class Message {
private int intendedUserId;
private String message;
// getters and setters
}
Just have 1 processor and sink from the processor.
FluxProcessor<Message> processor;
FluxSink<Message> sink;
Push all the messages via the sink.
sink.next(msg);
Your controller would be more or less like this. Here I assume you have some method to get the user id authtoken.getUserId(). Here the filter is part of the Flux.
#GetMapping(value = "/msg", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<Message> getMessages(){
return processer
.filter(msg -> msg.getIntendedUserId() == authtoken.getUserId());
}
I'm integrating card payments into a web portal using SagePay UK's Server protocol.
I'd like to know when the transaction has been settled with the bank, so that update the status in the backend. I've looked in MySagePay on the test environment and all our transactions say "Settlement Info: This transaction has not been settled."
Is there a way I can access this settlement info through the Reporting and Admin API? Perhaps one of the fields on either getTransactionDetail or getBatchDetail contain this information - but I can't tell from reading the documentation.
You won't be able to test settlement on the test server - it is a dummy system, hence the settlement processes required to populate the batchid aren't run.
In the live situation, you have two options:
You can use getBatchList to determine which batches of transactions have been sent for settlement (and reported back as settled), then use getBatchDetail to determine which transactions were settled in that batch.
Or you can use getTransactionDetail to establish if there is a batchid for the specific transaction you wish to check.
The getTransactionDetail endpoint returns a lot of transaction data, including the status, on the basis of the transaction-code.
You can use this NuGet package to call, for example, the getTransactionDetail endpoint:
https://www.nuget.org/packages/Joe.Opayo.Admin.Api.Client/1.1.0
The client app allows code like this:
var client = new OpayoAdminApiClient();
var isTest = true;
var request = new OpayoApiRequest(ApiCommandType.GetTransactionDetail, "password", isTest, "user-name", "vendor-name");
var commandSpecificXml = "<vendortxcode>01Jan2010Transaction12345</vendortxcode>";
return await client.ProcessApiCommandAsync<TransactionDetail>(request, commandSpecificXml);
Why does the endpoint return different expiresAt value when I hit this endpoint {{URL}}/api/v1/sessions/me again and again?
Initially,expiresAt showed me something like 12:34:56.When I hit is again in 1 minute time,it gave me 12:34:78.But I didnt perform any action in the UI side while that interval.Why is the expiration time getting refreshed?
Making a call to /sessions/me renews the session expiration. It isn't just interaction with the UI that will extend the session, API calls on behalf of the user will extend it as well.