|
|
@ -337,7 +337,7 @@ PayPro.prototype.sign = function(key) { |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
PayPro.prototype.verify = function() { |
|
|
|
PayPro.prototype.verify = function(returnTrust) { |
|
|
|
if (this.messageType !== 'PaymentRequest') |
|
|
|
throw new Error('Verifying can only be performed on a PaymentRequest'); |
|
|
|
|
|
|
@ -346,7 +346,7 @@ PayPro.prototype.verify = function() { |
|
|
|
if (pki_type === 'SIN') { |
|
|
|
return this.sinVerify(); |
|
|
|
} else if (pki_type === 'x509+sha1' || pki_type === 'x509+sha256') { |
|
|
|
return this.x509Verify(); |
|
|
|
return this.x509Verify(returnTrust); |
|
|
|
} else if (pki_type === 'none') { |
|
|
|
return true; |
|
|
|
} |
|
|
|