...
|
...
|
@@ -53,10 +53,18 @@ public class AlipaySignatureHelper { |
|
|
|
|
|
public boolean verifyWithRsa(String content, String charset, String sign) {
|
|
|
boolean success = false;
|
|
|
try {
|
|
|
success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType());
|
|
|
} catch (AlipayException e) {
|
|
|
throwSignatureException(e);
|
|
|
if (setting.isUseMapi()) {
|
|
|
try {
|
|
|
success = alipayMapiHelper.verify(setting.getPartnerId(), content, sign, charset, setting.getRsaType());
|
|
|
} catch (AlipayException e) {
|
|
|
throwSignatureException(e);
|
|
|
}
|
|
|
} else {
|
|
|
try {
|
|
|
success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType());
|
|
|
} catch (AlipayException e) {
|
|
|
throwSignatureException(e);
|
|
|
}
|
|
|
}
|
|
|
return success;
|
|
|
}
|
...
|
...
|
|