Issuer Scripts on Verifone Vx PIN pads - emv

Does anyone know how the issuer script processing flow is supposed to work on VeriFone PIN pads? As I understand it, the card processor sends back the script(s) in a 9f18 tag. The scripts marked with 71 tag are to be processed prior to the second Generate AC and the one marked with 72 tag are to be processed after. My question is, what are the sequence of commands, C34, C25 in each case? I suppose you can have one or more 71s and 72s at the same time. The VeriFone API specification says this:
Re C25: "This command contains the scripts that are received from the host. The script results are returned in the C34 response."
Also, "All scripts need to be initialized by sending a C34 to the PINpad"
So, it's not clear if you send all the C25s, one for each script, and then a C34 or perhaps the 71s before and then the 72s after the C34.

Send multiple C25's as needed, C25 only supports one script at a time. Do not try to distinguish the 71 and 72 scripts, just send them. After all the scripts, send the C34.
From the Integrators Guide FAQ section:
Q: When receiving a 72 script when do we send the C34 to the pinpad?
A: C34 is always sent after the C25. The pinpad will process based on the script before or after the second generate AC.

Related

Google Apps Script -GmailApp.search not returning all results (some are missing)

I am looking for some assistance as I did a bunch of searching and saw others with similiar problems but no solution. Simply put the google apps script class/method GmailApp.search is not returning a full set of results, and it is clearly not due to a limit or anything I can see obviously like that.
Very basic usage... I have a Gmail label, lets call it "labelname" with 118 messages in it. When I search on www.gmail.com and enter "label:labelname" in the search box I get back 118 results as expected, but when I run: GmailApp.search('label:labelname'); from my script it returns only 116.
Script search syntax:
threads = GmailApp.search('label:labelname');
After finding I am missing results I also added the count method to verify:
Logger.log(threads.length)
Which also returns 116.
I removed my label and re-added it to all 118 and GmailApp.search still only found 116.
I added my label to an additional message and tested again, now 119 on gmail.com and it went up to 117 in script result. Still missing same 2 messages.
What could it be? Their is nothing noticeable different about the 2 messages missing. Same folder, same label, same exact style message send on the same date as others.
What could cause this?
Thanks so much in advance for any suggestions!
GmailApp.search gives threads not individual mails.
If you unset the Conversation View in Gmail settings. It will show individual mails. So in that case there will be a mismatch between the count.

To get sample Issuer Script Template 1(Tag 71) value

I would like to get sample Issuer Script Template 1(Tag 71) or Issuer Script Template 2(Tag 72) value for testing the Kernel Application.
Thanks for the help....
In order that not just anyone pass some issuer script to a card and change its counters, SMI Secure messaging for Integrity( to make sure the data is not altered) and SMC - Secure messaging for confidentiality (to make sure none other can read) is used. Read EMV Book 2 Section 9
Secure Messaging for this.
Once you are done with this part, you can check Book 3 on what script you need to pass to the card.
This is packed in a Template 71 or 72 for the below reason.
Issuer scripts with tag '71' shall be processed prior to issuing the
final GENERATE AC command.
Issuer scripts with tag '72' shall be processed after issuing the
final GENERATE AC command.
Since this involves a MAC( based on your SMI Session Key) and a Cryptogram( based on SMC Session Key), I don't think a sample would help.

VerifoneEMV: Second Generate AC?

I am working on MasterCard Acquisition project using emv Module 6.2. I can successfully generate 1st Ac and retrieve tags from it properly but i am asked to include also the result of the 2nd AC in my ICC data before transmission to the issuer.
How can i generate the 2nd AC and include it in my field 55?
There looks to be some misunderstanding in what you need. can you explain the complete context. Below is how you deal in ideal environment.
In first generate AC
if you get ARQC you send it online to issuer.
If you receive TC you approve the transaction offline.
If it is AAC you decline offline.
Now assume you get ARQC and you are not able to go online, you check default action codes and if allowed you request for TC in second generate. If you get TC your transaction is approved offline, else you get AAC and transaction is declined!!!
---------------------05-Dec-2016-----------------------
Ok then i guess this is what you are looking for. CVR Byte 1 Bit 8 will tell whether second generate AC was requested or not. In an online transaction(after 1st Gen AC) this will be 1.Can you check what is it that you are sending now ?. Check the image for more information.
Now you may not need action codes but fyi, you have three types of action codes. denial (to decline the transaction offline), online( to send transactions to issuer), default( to decide on how to proceed when online was opted but unable to. There are two sets of action codes - Terminal( which is used in terminal action analysis) and issuer( which is used by card action analysis). download emv books here to read more.
Btw, are you doing M-TIP ?

Can I rely on the "Date: " email header?

I've got a few maildirs I grabbed with getmail (both inbox and sent) and I want to give the eml files names that represent the date and time each mail has arrived (or was sent):
johnsmith#example.org-inbox-2015-07-28T20.02.14+0000.eml
(I want Windows to read the files, so no colons)
I've noticed that there is only one occurence of "Date: " inside the eml files:
Date: Tue, 28 Jul 2015 20:02:14 +0000
Can I rely on this piece of header to rename the files? Is it reliable?
(I plan to write a posix or bash script for this task)
Short answer: nope.
The Date header (and most of the other headers) is set by the client (and is not required), so it could be just anything or absent.
Spams appart, since the Date field is set by the MUA(/MSA) and still a lot of people are not synced with NTP or did not care to configure their working station properly, it is more than often wrong.
I also often see missconfigured automated mailer or MTA...
The date found in the Received headers is slightly more trustworthy because it is set by the realying MTA and the probability they are well configured is higher.
Note that except for the last one (the top-most in appearing order) which is your server (in your case GMail) they can be forged too.

Unclear how to address SES initialization errors in Google Apps Script

I have a script that I want to run as a dialog in a Google text document. When I replace the URL in the call to HtmlService.createHtmlOutputFromFile with a simple script it works fine. For my script it seems that it was rejected by SES initialization. I see in the console:
SES initialization
...
ses-single-frame.opt.js?debug=1:43 Max Severity: Safe spec violation(1).
ses-single-frame.opt.js?debug=1:43 440 Apparently fine
ses-single-frame.opt.js?debug=1:43 43 Deleted
ses-single-frame.opt.js?debug=1:43 3 Frozen harmless
ses-single-frame.opt.js?debug=1:43 1 Skipped
ses-single-frame.opt.js?debug=1:43 Max Severity: Safe spec violation(1).
ses-single-frame.opt.js?debug=1:43 initSES succeeded.
I assume that somewhere I'm violating the GAS security restrictions but I don't know how to find out where. Is there a way to find out where in my code there is a "Safe spec violation"?
Don't worry.
SES initialization occurs long before any code you write is loaded; the log you are looking at refers to errors in the browser's implementation of JavaScript and web APIs.
The one reason that you might care about what's in this log is if SES failed to successfully patch a bug that affected your code — however, the result would be no worse than running the same code in the same browser outside of the Caja environment, and the bugs SES concerns itself with are generally corner cases that typical JavaScript code will never get near (unless it uses Object.freeze).