-
-
Save wehub/bd9ea2a2f3f5fb96d10e7241598429f4 to your computer and use it in GitHub Desktop.
Java_SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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