Add to readme

This commit is contained in:
Roopak Venkatakrishnan 2019-06-26 21:22:30 -07:00
parent fd873cc35b
commit c85effd4a6

View File

@ -34,6 +34,7 @@ Currently supports **v2** only, if you want to use **v1**, use **v1.1.4** git ta
* GET /v2/payments/sale/**ID**
* POST /v2/payments/sale/**ID**/refund
* GET /v2/payments/refund/**ID**
* POST /v2/checkout/orders
* GET /v2/checkout/orders/**ID**
* POST /v2/checkout/orders/**ID**/authorize
* POST /v2/checkout/orders/**ID**/capture
@ -108,6 +109,12 @@ refund, err := c.GetRefund("O-4J082351X3132253H")
order, err := c.GetOrder("O-4J082351X3132253H")
```
### Create an Order
```go
order, err := c.CreateOrder(paypalsdk.OrderIntentCapture, []paypalsdk.PurchaseUnitRequest{paypalsdk.PurchaseUnitRequest{ReferenceID: "ref-id", Amount: paypalsdk.Amount{Total: "7.00", Currency: "USD"}}})
```
### Authorize Order
```go