Authored by LUOXC

fixbug

@@ -53,11 +53,19 @@ public class AlipaySignatureHelper { @@ -53,11 +53,19 @@ 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 + 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 {
56 try { 63 try {
57 success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType()); 64 success = alipayOpenapiHelper.verify(setting.getAppId(), content, sign, charset, setting.getRsaType());
58 } catch (AlipayException e) { 65 } catch (AlipayException e) {
59 throwSignatureException(e); 66 throwSignatureException(e);
60 } 67 }
  68 + }
61 return success; 69 return success;
62 } 70 }
63 71