You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# Introduction
2
2
3
-
This Package is a PHP SDK wrapper around version 2 of the PayPal rest API. It provides a simple, fluent API to create
4
-
and capture orders with both sandbox and production environments supported.
3
+
This Package is a PHP SDK wrapper around version 2 of the PayPal rest API. It provides a simple, fluent API to create and capture orders with both sandbox and production environments supported.
5
4
6
5
Here are some quick code examples of what you can do:
Copy file name to clipboardExpand all lines: docs/basic-usage/order-capture.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
# Capture an Order
2
2
3
-
To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be
4
-
provided in the request. A buyer can approve the order upon being redirected to the `rel:
5
-
approve` URL that was provided the HATEOAS links in the [Create Order](order-create.md) response.
3
+
To successfully capture payment for an order, the buyer must first approve the order or a valid payment\_source must be provided in the request. A buyer can approve the order upon being redirected to the `rel: approve` URL that was provided the HATEOAS links in the [Create Order](order-create.md) response.
A successful response to a non-idempotent request returns the HTTP `201` Created status code with a JSON response body
24
-
that shows captured payment details. If a duplicate response is retried, returns the HTTP `200` OK status code. By
25
-
default, the response is minimal.
21
+
A successful response to a non-idempotent request returns the HTTP `201` Created status code with a JSON response body that shows captured payment details. If a duplicate response is retried, returns the HTTP `200` OK status code. By default, the response is minimal.
26
22
27
-
```json
23
+
```javascript
28
24
{
29
25
"id":"8F783829JA718493L",
30
26
"intent":"CAPTURE",
@@ -157,8 +153,7 @@ default, the response is minimal.
157
153
158
154
## Catching Errors
159
155
160
-
If a payment is not yet approved by the buyer, An error response with status code `422` is returned with a JSON response
161
-
body that shows errors.
156
+
If a payment is not yet approved by the buyer, An error response with status code `422` is returned with a JSON response body that shows errors.
162
157
163
158
Inorder to catch validation errors from PayPal, you can add the following:
0 commit comments