Skip to content

Instantly share code, notes, and snippets.

@wehub
Last active June 29, 2021 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wehub/bd9ea2a2f3f5fb96d10e7241598429f4 to your computer and use it in GitHub Desktop.
Save wehub/bd9ea2a2f3f5fb96d10e7241598429f4 to your computer and use it in GitHub Desktop.
Java_SDK
public static void main(String[] args) {
Configuration configuration = new Configuration();
configuration.setAppId(<APP ID>);
configuration.setAppToken(<APP Token>);
configuration.setEnvironment(Environment.STAGE);
WePayRequest.initializeRequest();
try {
String idOfDispute = <Insert ID of Dispute>;
DisputesIdConcedeAdditionalParams disputesIdConcedeAdditionalParams = new DisputesIdConcedeAdditionalParams();
disputesIdConcedeAdditionalParams.setUniqueKey("333333");
Dispute dispute = DisputesApi.concede(idOfDispute, disputesIdConcedeAdditionalParams);
LOGGER.log(Level.INFO, "Successfully Conceded a Dispute.");
} catch (WePayException e) {
LOGGER.warning(e.getMessage());
for (WePayException.Detail detail : e.getDetails()) {
LOGGER.warning(String.join(".", detail.getTarget()));
LOGGER.warning(detail.getMessage());
}
} catch (JSONException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment