/* (non-Javadoc)
@see com.popbill.api.CashbillService#issue(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
1147
@Override
	public Response issue(String CorpNum, String MgtKey, String Memo,
			String UserID) throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

		String PostData = toJsonString(new MemoRequest(Memo));

		return httppost("/Cashbill/" + MgtKey, CorpNum, PostData,
				UserID, "ISSUE", Response.class);
	}
353612
@Override
	public FAXSearchResult search(String corpNum, String sDate, String eDate,
			String[] state, Boolean reserveYN, Boolean senderOnly, int page,
			int perPage, String order, String qString) throws PopbillException {
		if (sDate == null)
			throw new PopbillException(-99999999, "시작일자가 입력되지 않았습니다.");
		if (eDate == null)
			throw new PopbillException(-99999999, "종료일자가 입력되지 않았습니다.");
		
		String uri = "/FAX/Search?SDate=" + sDate;
		uri += "&EDate=" + eDate;
		uri += "&State=" + Arrays.toString(state)
				.replaceAll("\\[|\\]|\\s", "");
		
		if (reserveYN) {
			uri += "&ReserveYN=1";
		} else {
			uri += "&ReserveYN=0";
		}
		
		if (senderOnly) {
			uri +="&SenderOnly=1";
		} else {
			uri += "&SenderOnly=0";
		}
		
		uri += "&Page=" + Integer.toString(page);
		uri += "&PerPage=" + Integer.toString(perPage);
		uri += "&Order=" + order;
		
		if (qString != null)
			uri += "&QString=" + qString;
		
		return httpget(uri, corpNum, null, FAXSearchResult.class);
	}
752942
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final IFile file = provider.getProjectUtil().findFileStorage(issue.getUriToProblem(), false);
		final ResourceSet resourceSet = provider.getResourceSetProvider().get(file.getProject());
		final EObject failingObject;
		try {
			failingObject = resourceSet.getEObject(issue.getUriToProblem(), true);
		} catch (Exception exception) {
			// Something is going really wrong. Must of the time the cause is a major syntax error.
			return;
		}
		XtendAnnotationTarget eObject = EcoreUtil2.getContainerOfType(failingObject, XtendAnnotationTarget.class);
		boolean first = true;
		int relevance = IProposalRelevance.ADD_SUPPRESSWARNINGS;
		while (eObject != null) {
			final URI uri = EcoreUtil2.getNormalizedURI(eObject);
			final SuppressWarningsAddModification modification = new SuppressWarningsAddModification(uri, issue.getCode());
			modification.setIssue(issue);
			modification.setTools(provider);
			final String elementName;
			final QualifiedName name = provider.getQualifiedNameProvider().getFullyQualifiedName(eObject);
			if (name != null) {
				elementName = name.getLastSegment();
			} else if (first) {
				elementName = Messages.AddSuppressWarnings_0;
			} else {
				elementName = null;
			}
			if (elementName != null) {
				acceptor.accept(issue,
						MessageFormat.format(Messages.AddSuppressWarnings_1, elementName),
						MessageFormat.format(Messages.AddSuppressWarnings_2, elementName),
						JavaPluginImages.IMG_OBJS_ANNOTATION_ALT,
						modification,
						relevance);
				--relevance;
			}
			first = false;
			eObject = EcoreUtil2.getContainerOfType(eObject.eContainer(), XtendAnnotationTarget.class);
		}
	}
620264
@SuppressWarnings("unused")
    @Override
    public void onPaymentError(int code, String response) {
        try {
            Toast.makeText(this, "Payment failed: " + code + " " + response, Toast.LENGTH_SHORT).show();
        } catch (Exception e) {
            Log.e(TAG, "Exception in onPaymentError", e);
        }
    }
941363
@Override
	public ChargeInfo getChargeInfo(String CorpNum, int ItemCode) throws PopbillException{
		return httpget("/Statement/ChargeInfo/" + Integer.toString(ItemCode), CorpNum, null, ChargeInfo.class);
	}
357494
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final BehaviorUnitGuardRemoveModification modification = new BehaviorUnitGuardRemoveModification();
		modification.setIssue(issue);
		modification.setTools(provider);
		acceptor.accept(issue,
				Messages.SARLQuickfixProvider_0,
				Messages.SARLQuickfixProvider_4,
				JavaPluginImages.IMG_CORRECTION_REMOVE,
				modification,
				IProposalRelevance.REMOVE_METHOD_BODY);
	}
1140392
@RequestMapping(value = "/qrpay")
    public void qrPay(
            @RequestParam("orderNumber") String orderNumber,
            HttpServletResponse response){
        try {
            String qrUrl = wepaySupport.qrPay(orderNumber);
            response.sendRedirect(qrUrl);
        } catch (IOException e) {
            log.error("failed to qr pay(orderNumber={}), cause: {}",
                    orderNumber, e.getMessage());
        }
    }
733878
@Override
	public Response update(String CorpNum, String MgtKey, Cashbill cashbill,
			String UserID) throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

		String PostData = toJsonString(cashbill);

		return httppost("/Cashbill/"+MgtKey, CorpNum,
				PostData, UserID, "PATCH", Response.class);
	}
557303
@Override
	public Response register(String CorpNum, Cashbill cashbill)
			throws PopbillException {
		return register(CorpNum, cashbill, null);
	}
831091
public Response checkLoginDeptUser(String CorpNum) throws PopbillException{
		if (CorpNum == null || CorpNum.isEmpty())
			throw new PopbillException(-99999999, "연동회원 사업자번호(CorpNum)가 입력되지 않았습니다.");
		
		return httpget("/HomeTax/Taxinvoice/DeptUser/Check", CorpNum, null, Response.class); 
	}
117659
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final String[] data = issue.getData();
		if (data != null && data.length > 1) {
			final String actionName = data[1];
			final ActionAddModification modification = new ActionAddModification(actionName);
			modification.setIssue(issue);
			modification.setTools(provider);
			acceptor.accept(issue,
					MessageFormat.format(Messages.SARLQuickfixProvider_2, actionName),
					MessageFormat.format(Messages.SARLQuickfixProvider_3, actionName),
					JavaPluginImages.IMG_CORRECTION_ADD,
					modification,
					IProposalRelevance.ADD_UNIMPLEMENTED_METHODS);
		}
	}
702717
@Fix(io.sarl.lang.validation.IssueCodes.USED_RESERVED_SARL_ANNOTATION)
	public void fixDiscouragedAnnotationUse(final Issue issue, IssueResolutionAcceptor acceptor) {
		AnnotationRemoveModification.accept(this, issue, acceptor);
	}
785832
public Issue issue(String name, Project project) {
        return issue(name, project, null);
    }
564454
@Override
	public Response registIssue(String CorpNum, Statement statement, String memo, 
			String UserID) throws PopbillException {
			
		statement.setMemo(memo);
		
		String PostData = toJsonString(statement);
		
		return httppost("/Statement",
				CorpNum, PostData, UserID, "ISSUE", Response.class);
	}
1134515
@Override
	public Cashbill getDetailInfo(String CorpNum, String MgtKey)
			throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

		return httpget("/Cashbill/" + MgtKey + "?Detail", CorpNum,
				null, Cashbill.class);
	}
475788
@Fix(IssueCodes.INVALID_MEMBER_NAME)
	public void fixMemberName(final Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRenameModification.accept(this, issue, acceptor);
		MemberRemoveModification.accept(this, issue, acceptor);
	}
860239
@Override
	public Response register(String CorpNum, Statement statement, String UserID)
			throws PopbillException {
		
		String PostData = toJsonString(statement);
		
		return httppost("/Statement", CorpNum, PostData, UserID, Response.class);
	}