"all output amount" - so do I add up the total value of the outputs?
Do I just put one scriptPubKey after the other?
you have to "concatenate" the bytes together.
so your "hashOutputs" is hash of the serialized TxOuts concatenated together. so for your 2 outputs it will be:
SHA256_d(amount1 || scriptPub1 || amount2 || scrioptPub2);
from the first example of
BIP-143:
output 1:
amount = 202cb20600000000
scriptPub = 1976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac
output 2:
amount = 9093510d00000000
scriptPub = 1976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac
SHA256_d(202cb206000000001976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac9093510d000000001976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac);