Authored by LUOXC

fixbug

@@ -53,10 +53,18 @@ public class AlipaySignatureHelper { @@ -53,10 +53,18 @@ public class AlipaySignatureHelper {
53 53
54 public boolean verifyWithRsa(String content, String charset, String sign) { 54 public boolean verifyWithRsa(String content, String charset, String sign) {
55 boolean success = false; 55 boolean success = false;
56 - try {  
57 - success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType());  
58 - } catch (AlipayException e) {  
59 - throwSignatureException(e); 56 + if (setting.isUseMapi()) {
  57 + try {
  58 + success = alipayMapiHelper.verify(setting.getPartnerId(), content, sign, charset, setting.getRsaType());
  59 + } catch (AlipayException e) {
  60 + throwSignatureException(e);
  61 + }
  62 + } else {
  63 + try {
  64 + success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType());
  65 + } catch (AlipayException e) {
  66 + throwSignatureException(e);
  67 + }
60 } 68 }
61 return success; 69 return success;
62 } 70 }