How to retrieve AFL from mastercard? - emv

I'm trying to read some data like track 2 from mastercard contactless. But the PDOL not returned after select AID command, so how can I construct GPO to read AFL? to initiate read records comnand. If there is any advice?

I trird to send GPO command without PDOL like this: "80A80000028300" and then I can read AFL in response.

Related

Wavefront Alerting when no data sent

I have wavefront alerts set up with the following alert condition:
ts(mytimeseries)<20000
Recently the datasource stopped sending data to wavefront but I did not receive an alert. I cannot figure out why this did not alert. Do I need to set up a separate alert for when data is not sent. Thanks
Yes in scenarios where there is no data sent you explicitly need to define the condition for that. Well the best approach is to create a new availability alert but still if you want to manipulate the same condition you can do something like below
default( 20001 ,ts(mytimeseries))<20000
In case there is no data found it will exceed your limit and will raise the alert

How to extract specific parts of several requests' responses in Postman and add it to a csv file?

Objective: Use an API to feed information into a excel file.
I have an .csv file containing over 8k entries. I will run API requests in a row for those 8k entries and would like to save parts of the reply in another .csv file for all entries.
For example:
file1.csv contains Groups IDS( group1, group2, group3, ...).
Every API request using the parameter of Group ID would return a complete response with several entries like the one below:
<entry>
<id>https://example/api/v1/OData/GroupMemberships(GroupId='Group1',MemberId='iYa4qIi86asvbG')</id>
<title type="text">GroupMemberships(GroupId='Group1',MemberId='iYa4qIi86asvbG')</title>
<updated>2022-06-03T13:20:57+00:00</updated>
<author>
<name/>
</author>
<content type="application/xml">
<m:properties>
<d:GroupId m:type="Edm.String">Group1</d:GroupId>
<d:MemberId m:type="Edm.String">iYa4qIi86asvbG</d:MemberId>
<d:MemberType m:type="Edm.String">admin</d:MemberType>
...
...
</m:properties>
...
So in every iteration of the runner, I would like to extract only the information about MemberId and MemberType, and add those to an excel file that will contain all the information. I expect more than 8000 groups and +100k memberids
Every request for one groupID returns several entries containing all memberIDs for this group > save those specific entries to CSV > run next request and repeat.
This CSV file would look like this:
Group ID
Member ID
Member Type
Group1
iYa4qIi86asvbG
Admin
Group1
memberid2
User
Group1
memberId3
User
Group2
memberid1
User
Group2
memberid2
Admin
...
...
...
I am trying to use Postman to run a batch of API requests (using Collection Runner) in order to get the information I need and feed those specific parts of the response into columns of the CSV. I was researching how to achieve this, but the results were not quite what I was expecting (either they wanted me to write the response into Postman variables or they wanted me to use Newman, which looked like would be too difficult for my current knowledge of API requests)
Is there an easy way to perform this with Postman (maybe writing a script in the Pre-request or test?) or should I try a different approach?

Monthly or weekly report of PayPal Completed Payments automatically

We can download a CSV or XLS of PayPal Completed Payments by manually going to https://business.paypal.com/merchantdata/reportHome and doing "Activity download":
But how to get this CSV report, automatically (via email or with an API), each week or each month, without having to manually log in on the website?
Note:
I've already looked at PayFlow reports and download-reports but it seems quite complex, and there is no full example (only XML samples but it's unclear how to use them)
I don't want to use IPN for this (I do use it for another task, but it's not perfectly reliable for other reasons, etc.)
Example of desired output:
"Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Shipping Address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Insurance Amount","Sales Tax","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Address Line 1","Address Line 2/District/Neighborhood","Town/City","State/Province/Region/County/Territory/Prefecture/Republic","Zip/Postal Code","Country","Contact Phone Number","Subject","Note","Country Code","Balance Impact"
"3/1/2018","04:52:07","CET","John Doe","Website Payment","Completed","EUR","100.00","0","100","johndoe#gmail.com","contact#example.com",...
"3/1/2018","16:29:30","CET","Mike Abcd","Website Payment","Completed","EUR","100.00","0","100","mikeabc#example.com","contact#example.com",...
You will have to do it through the XML api. Basically, you make a post request with the example XML in the link you gave but with your data. The response will be in XML and you take the returned reportId and then call the get report api and it will return in xml the report data.

Automating Requests Through Postman

I have ~10,000 records in a csv file that I need to run through postman and check the output it gives.
I was wondering (because I've been doing this manually) if there's a way to import the csv file into postman, and use the rows like variables and just 'scroll' through each result it gives out.
Cheers,
Daniel
This feature exists in Postman runner.
You have to make sure your CSV column's name(s) match the name(s) of your variable(s) in your collection.
You select your CSV file in the "data" part, just above the "start run", and when you run your collection, it will parse your file and replace the variable(s) with the value in the corresponding column and execute the request.
Then it will loop and get the next value and execute, and so on.
It just depends on the content of your CSV file and how you use it in your Postman request.
You shall have a look at those links :
https://www.getpostman.com/docs/postman/collection_runs/working_with_data_files
http://blog.getpostman.com/2014/10/28/using-csv-and-json-files-in-the-postman-collection-runner/
They will give you complete explanation about how it works.
Alex

Unable to retrieve unlimited number of record via API

We are struggling to mine all time records for this year via API.
We have tried to include the :dont_limit_result GET variable and set it to 1, however it did not help us.
The version that we use is ACTIVE COLLAB 5.11.0, the URL we are hitting: projects?dont_limit_result=1&page=$page
Please give me some advise on how to proceed.
Most of API responses are paginated, and pagination can't be turned off using a GET switch. Instead, you should check following headers:
X-Angie-PaginationCurrentPage - indicates current page
X-Angie-PaginationItemsPerPage - indicates number of items per page
X-Angie-PaginationTotalItems - indicates number of items in the entire data set.
and walk through pages until you reach the end of data set.
Another option is to give project's filter a try. Here's an example request that will return all projects:
curl -H "X-Angie-AuthApiToken: YOUR-API-TOKEN" "http://your.activecollab.com/api/v1/reports/run?type=ProjectsFilter"
This one will return all active projects:
curl -H "X-Angie-AuthApiToken: YOUR-API-TOKEN" "http://your.activecollab.com/api/v1/reports/run?type=ProjectsFilter&completed_on_filter=is_not_set"
I'm using the php API wrapper 3.0 - how do i get the headers back to know there are more pages and then what is the correct form of the query to get further pages?
For example my basic query is:
$timeRecords = $client->get('projects/22/time-records')->getJson();
to get time records - but this only returns 100 and there are more!
Thanks,
P