Skip to content

Commit 00a4475

Browse files
Mohammed Elhaouarigitbook-bot
authored andcommitted
GitBook: [main] 17 pages modified
1 parent eb2f4c6 commit 00a4475

17 files changed

+57
-57
lines changed

docs/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Introduction
22

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.
54

65
Here are some quick code examples of what you can do:
76

@@ -49,7 +48,5 @@ $result = json_decode($response->getBody()->getContents());
4948

5049
## We have badges!
5150

52-
![Tests](https://github.com/phpjuice/paypal-checkout-sdk/workflows/Tests/badge.svg?branch=main)
53-
[![Latest Stable Version](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/v)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk)
54-
[![Total Downloads](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/downloads)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk)
55-
[![License](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/license)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk)
51+
![Tests](https://github.com/phpjuice/paypal-checkout-sdk/workflows/Tests/badge.svg?branch=main) [![Latest Stable Version](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/v)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk) [![Total Downloads](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/downloads)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk) [![License](http://poser.pugx.org/phpjuice/paypal-checkout-sdk/license)](https://packagist.org/packages/phpjuice/paypal-checkout-sdk)
52+

docs/SUMMARY.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# Summary
1+
# Table of contents
22

3-
- [Introduction](README.md)
4-
- [Requirements](requirements.md)
5-
- [Installation](installation.md)
6-
- [Upgrading](upgrading.md)
7-
- [Questions and issues](questions-and-issues.md)
8-
- [Changelog](changelog.md)
3+
* [Introduction](README.md)
4+
* [Requirements](requirements.md)
5+
* [Installation](installation.md)
6+
* [Upgrading](upgrading.md)
7+
* [Questions and issues](questions-and-issues.md)
8+
* [Changelog](changelog.md)
99

1010
## Basic Usage
1111

12-
- [Create an Order](basic-usage/order-create.md)
13-
- [Show an Order](basic-usage/order-show.md)
14-
- [Capture an Order](basic-usage/order-capture.md)
12+
* [Create an Order](basic-usage/order-create.md)
13+
* [Show an Order](basic-usage/order-show.md)
14+
* [Capture an Order](basic-usage/order-capture.md)
1515

1616
## Api
1717

18-
- [Amount](api/amount.md)
19-
- [Amount Breakdown](api/amount-breakdown.md)
20-
- [Application Context](api/application-context.md)
21-
- [Item](api/item.md)
22-
- [Order](api/order.md)
23-
- [Payee](api/payee.md)
24-
- [Purchase Unit](api/purchase-unit.md)
18+
* [Amount](api/amount.md)
19+
* [Amount Breakdown](api/amount-breakdown.md)
20+
* [Application Context](api/application-context.md)
21+
* [Item](api/item.md)
22+
* [Order](api/order.md)
23+
* [Payee](api/payee.md)
24+
* [Purchase Unit](api/purchase-unit.md)
25+

docs/api/amount-breakdown.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# AmountBreakdown
1+
# Amount Breakdown
22

33
coming soon.
4+

docs/api/amount.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Amount
22

33
coming soon.
4+

docs/api/application-context.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Application Context
22

33
coming soon.
4+

docs/api/item.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Item
22

33
coming soon.
4+

docs/api/order.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Order
22

33
coming soon.
4+

docs/api/payee.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Payee
22

33
coming soon.
4+

docs/api/purchase-unit.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# PurchaseUnit
1+
# Purchase Unit
22

33
coming soon.
4+

docs/basic-usage/order-capture.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Capture an Order
22

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.
64

75
```php
86
use PayPal\Checkout\Http\OrderCaptureRequest;
@@ -20,11 +18,9 @@ $response = $client->send($request);
2018
$result = json_decode($response->getBody()->getContents());
2119
```
2220

23-
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.
2622

27-
```json
23+
```javascript
2824
{
2925
"id": "8F783829JA718493L",
3026
"intent": "CAPTURE",
@@ -157,8 +153,7 @@ default, the response is minimal.
157153

158154
## Catching Errors
159155

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.
162157

163158
Inorder to catch validation errors from PayPal, you can add the following:
164159

@@ -176,7 +171,7 @@ try {
176171

177172
Errors :
178173

179-
```json
174+
```javascript
180175
{
181176
"name": "UNPROCESSABLE_ENTITY",
182177
"details": [
@@ -196,3 +191,4 @@ Errors :
196191
]
197192
}
198193
```
194+

0 commit comments

Comments
 (0)