Ok, I'm following. So this means that the unhashed Payment Details are not required to verify the signature, contrary to my presumption before. Any light to shed on why the Payment Details are used to generate signatures at all? They themselves form no part of the verification. Is it useful (for security?) to have some piece of "unique to this transaction" data to generate the signature? I appreciate that the hashed Payment Details are not being sent to the CA, so if anything they're more vulnerable when sent SSL encrypted, but not hashed, to the user from the merchant (as well as from the user to the merchant in the first instance). There must be a good reason to hash the Payment Details and have them specifically signed and sent to the user for verification against the CA certificate (which the user already possesses locally via a web browser or their OS)!
Sorry about all this, but I'm quite capable of misinterpreting documents like BIP 70 that are pretty concisely defined in their descriptions, now that I can take another look having talked it over.
No, the payment details are needed for verification.
You sign by putting (private key, message) into the signing function, and you get back a signature. You verify by putting (public key, signature, message) into the verification function, and you get back a boolean.
Inside both of those functions, the message is hashed, and the hash is used internally.*
The idea is that the merchant can say "I will ship item X to you, if Y bitcoins show up at address Z". They then sign that message (which involves hashing the message and then, ahem, "multiplying"** the hash by their private key) and then they send you (public key [in certificate form], signature, message).
You then stuff (public key, signature, message) into the verification function, and it will hash the message, then "multiply" the message hash by the public key, and then check to see if the product it calculated bears the proper relationship to the signature**. It then returns TRUE or FALSE.
At this point, if the verification returned TRUE, you know with certainty that the message in question was signed by the private key that corresponds to the public key you are looking at.
Note that you explicitly do not know
who signed the message yet. This is where PKI comes in. I wrote a longer post about PKI earlier, and I won't rehash it all. But basically, you repeat the signature verification process, but this time the message to be checked is the certificate presented by the merchant, and the public key used for verification is from a certificate provided by someone that you explicitly (or implicitly) trust to only sign certificates that bear verifiable contact information tying the certificate to a real world entity (someone you can sue, basically).
When that is done, you now know that the message was actually signed by a real world entity which has been validated by the CA that you trust for such things. The last step is to compare the entity information from the certificate against the entity information you were expecting to deal with. Without this step, an attacker could potentially get a perfectly valid and verified certificate for "Bob's Malware Farm, LLC." and present it to you after hijacking your attempt to log in to your bank's website. Hopefully, you'll notice that the certificate presented wasn't the "Global Megabank Savings and Theft" certificate that you were expecting and you won't give the attacker your account info.
* The hash function forces the input to the actual signing function to be a known size, which is very useful to the signing function. Hash functions aren't perfect, but the structure of the message makes it impossible to find working pre-images. This is a subtle point, but all of our structured signatures would remain safe, even if the hashing function in the signing function were found to be generally insecure. ** I'm doing a lot of handwaving here. The signing function isn't really multiply, and I'm not going into detail on how signatures are verified in reality. This is something you can look up if you want to, for the purposes of this discussion, we can just assume that these functions exist and work correctly.