Strip whitespace from the purchase_id in DetailRecords.

Also add an :unchanged argument in case other clients want the
purchase_id verbatim.