Skip to content

Commit

Permalink
DX-2255: Feedback from William fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
arebra committed Oct 31, 2023
1 parent 5ae012e commit d952b53
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 84 deletions.
16 changes: 9 additions & 7 deletions _includes/payment-order-cancel-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ specific payment.

To cancel a previously created payment, you must perform the `cancel` operation
against the accompanying `href` returned in the `operations` list. You can only
cancel a payment - or part of a payment - which has not been captured yet.
cancel a payment - or part of a payment - which has not been captured yet. If
you cancel before any capture has been done, no captures can be performed later.

{% else %}

To cancel a previously created payment, you must perform the
`create-paymentorder-cancel` operation against the accompanying `href` returned
in the `operations` list. You can only cancel a payment - or part of a payment -
which has not been captured yet.
which has not been captured yet. If you cancel before any capture has been done,
no captures can be performed later.

{% endif %}

Expand Down Expand Up @@ -72,9 +74,6 @@ api-supported-versions: 3.1
"currency": "SEK",
"amount": 1500,
"vatAmount": 375,
"remainingCaptureAmount": 0,
"remainingCancellationAmount": 0,
"remainingReversalAmount": 0,
"description": "Test Purchase",
"initiatingSystemUserAgent": "<should be set by the system calling POST:/psp/paymentorders>",
"language": "sv-SE",
Expand Down Expand Up @@ -171,8 +170,11 @@ api-supported-versions: 3.1

## Cancel Sequence Diagram

Cancel can only be done on a authorized transaction. If you perform a cancel
after doing a partial capture, you will cancel the remaining authorized amount.
Cancel can only be done on an authorized transaction. As a cancellation does not
have an amount associated with it, it will release the entire reserved amount.
If your intention is to make detailed handling, such as only capturing a partial
amount of the transaction, you must start with the capture on the desired amount
before performing a cancel for the remaining reserved funds.

```mermaid
sequenceDiagram
Expand Down
13 changes: 9 additions & 4 deletions _includes/payment-order-cancel.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ specific payment.

To cancel a previously created payment, you must perform the `cancel` operation
against the accompanying `href` returned in the `operations` list. You can only
cancel a payment - or part of a payment - which has not been captured yet.
cancel a payment - or part of a payment - which has not been captured yet. If
you cancel before any capture has been done, no captures can be performed later.

{% else %}

To cancel a previously created payment, you must perform the
`create-paymentorder-cancel` operation against the accompanying `href` returned
in the `operations` list. You can only cancel a payment - or part of a payment -
which has not been captured yet.
which has not been captured yet. If you cancel before any capture has been done,
no captures can be performed later.

{% endif %}

Expand Down Expand Up @@ -104,8 +106,11 @@ Content-Type: application/json

## Cancel Sequence Diagram

Cancel can only be done on a authorized transaction. If you perform a cancel
after doing a partial capture, you will cancel the remaining authorized amount.
Cancel can only be done on an authorized transaction. As a cancellation does not
have an amount associated with it, it will release the entire reserved amount.
If your intention is to make detailed handling, such as only capturing a partial
amount of the transaction, you must start with the capture on the desired amount
before performing a cancel for the remaining reserved funds.

```mermaid
sequenceDiagram
Expand Down
38 changes: 3 additions & 35 deletions _includes/payment-order-capture-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,7 @@ Content-Type: application/json;version=3.1
"amount": 1500,
"vatAmount": 375,
"payeeReference": "AB832",
"receiptReference": "AB831",
"orderItems": [
{
"reference": "P1",
"name": "Product1",
"type": "PRODUCT",
"class": "ProductGroup1",
"itemUrl": "https://example.com/products/123",
"imageUrl": "https://example.com/product123.jpg",
"description": "Product 1 description",
"discountDescription": "Volume discount",
"quantity": 4,
"quantityUnit": "pcs",
"unitPrice": 300,
"discountPrice": 200,
"vatPercent": 2500,
"amount": 1000,
"vatAmount": 250
},
{
"reference": "P2",
"name": "Product2",
"type": "PRODUCT",
"class": "ProductGroup1",
"description": "Product 2 description",
"quantity": 1,
"quantityUnit": "pcs",
"unitPrice": 500,
"vatPercent": 2500,
"amount": 500,
"vatAmount": 125
}
]
"receiptReference": "AB831"
}
}
```
Expand Down Expand Up @@ -146,8 +114,8 @@ api-supported-versions: 3.1
"currency": "SEK",
"amount": 1500,
"vatAmount": 375,
"remainingCaptureAmount": 0,
"remainingCancellationAmount": 0,
"remainingCaptureAmount": 0, // Only present after a partial capture
"remainingCancellationAmount": 0, // Only present after a partial capture
"remainingReversalAmount": 1500,
"description": "Test Purchase",
"initiatingSystemUserAgent": "<should be set by the system calling POST:/psp/paymentorders>",
Expand Down
40 changes: 3 additions & 37 deletions _includes/payment-order-reversal-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,40 +46,7 @@ Content-Type: application/json;version=3.1
"description": "Reversal of captured transaction",
"amount": 1500,
"vatAmount": 375,
"payeeReference": "ABC123",
"receiptReference": "ABC122",
"orderItems": [
{
"reference": "P1",
"name": "Product1",
"type": "PRODUCT",
"class": "ProductGroup1",
"itemUrl": "https://example.com/products/123",
"imageUrl": "https://example.com/product123.jpg",
"description": "Product 1 description",
"discountDescription": "Volume discount",
"quantity": 4,
"quantityUnit": "pcs",
"unitPrice": 300,
"discountPrice": 200,
"vatPercent": 2500,
"amount": 1000,
"vatAmount": 250
},
{
"reference": "P2",
"name": "Product2",
"type": "PRODUCT",
"class": "ProductGroup1",
"description": "Product 2 description",
"quantity": 1,
"quantityUnit": "pcs",
"unitPrice": 500,
"vatPercent": 2500,
"amount": 500,
"vatAmount": 125
}
]
"payeeReference": "ABC123"
}
}
```
Expand Down Expand Up @@ -135,9 +102,8 @@ api-supported-versions: 3.1
"currency": "SEK",
"amount": 1500,
"vatAmount": 375,
"remainingCaptureAmount": 0,
"remainingCancellationAmount": 0,
"remainingReversalAmount": 0,
"remainingCaptureAmount": 0, // Only present after a partial reversal
"remainingReversalAmount": 0, // Only present after a partial reversal
"description": "Test Purchase",
"initiatingSystemUserAgent": "<should be set by the system calling POST:/psp/paymentorders>",
"language": "sv-SE",
Expand Down
2 changes: 1 addition & 1 deletion checkout-v3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ below to read more." %}

<div class="row mt-4">
<div class="col-xxl-3 col-xl-6 col-lg-6 d-flex">
<a href="/checkout-v3/resources/development-guidelines" class="dx-card">
<a href="/checkout-v3/resources/development-guidelines/" class="dx-card">
<span class="dx-card-icon">
<i class="material-icons-outlined">
account_circle
Expand Down

0 comments on commit d952b53

Please sign in to comment.