Skip to content

Commit 95c4f2d

Browse files
SP-349 Java - Updates for POST /refunds
1 parent 8d3ca0f commit 95c4f2d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/bitpay/sdk/Client.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ public Invoice cancelInvoice(String invoiceId, Boolean forceCancel) throws Invoi
564564
public Refund createRefund(String invoiceId, Double amount, Boolean preview, Boolean immediate, Boolean buyerPaysRefundFee, String reference) throws RefundCreationException, BitPayException {
565565
final Map<String, Object> params = new HashMap<>();
566566
params.put("token", this.getAccessToken(Facade.Merchant));
567+
params.put("guid", this.getGuid());
567568
if (invoiceId == null && amount == null) {
568569
throw new RefundCreationException(null ,"Invoice ID, amount and currency are required to issue a refund.");
569570
}

src/main/java/com/bitpay/sdk/model/Invoice/Refund.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public Refund() {
6363
//
6464

6565
/**
66-
* Gets guid.
66+
* Gets a variable provided by the merchant and designed to be used by the merchant to correlate the refund with a refund ID in their system.
6767
*
6868
* @return the guid
6969
*/
@@ -74,7 +74,7 @@ public String getGuid() {
7474
}
7575

7676
/**
77-
* Sets guid.
77+
* Sets a variable provided by the merchant and designed to be used by the merchant to correlate the refund with a refund ID in their system.
7878
*
7979
* @param guid the guid
8080
*/

0 commit comments

Comments
 (0)