Create AP smart contract
Now that the portals to the world outside the Ethereum blockchain are defined, the smart contract TNSR AP that pays the vendors which accept Ethereum will be created. This smart contract had to wait for the others because it uses the AP batch to determine IF payment is valid and they must agree.
The AP Batch contract sends the vendor transactions accepting cryptocurrency as payment to only one place. The TNSR AP contract accepts that list and pays the vendor from the funds deposited in it by another contract, TNSR Lockbox, which is created next.
A TNSR AP payment request can only be received which is inside the AP batch and can only come from the unique AP Batch. If the funds deposited don’t match the AP Batch total, or a vendor cryptocurrency wallet is not found, or any number of other discrepancies, a cascading shutdown of the system proceeds. The integration of the contracts is such that any discrepancy leads to a system halt which only specific corporate officers may override. Attempted hacks would require serious coordination across the entire cluster.
The Shutdown/Pausable feature was adopted from CryptoKitties and OpenZeppelin