Skip to content

Commit faf4c56

Browse files
committed
Fix snippet in README
1 parent 80fe8f9 commit faf4c56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const checkoutApi = new CheckoutAPI(client);
113113
};
114114

115115
// Step 5: Make the request
116-
checkoutAPI.payments(paymentRequest)
116+
checkoutApi.PaymentsApi.payments(paymentRequest)
117117
.then(paymentResponse => console.log(paymentResponse.pspReference))
118118
.catch(error => console.log(error));
119119
```
@@ -182,7 +182,7 @@ Create a the request object. For example, for a request to the `/payments` endpo
182182
Use the API object's method to make the request. For example, to make a request to the `/payments` endpoint using the `CheckoutAPI` object:
183183

184184
```
185-
checkoutAPI.payments(paymentRequest)
185+
checkoutApi.PaymentsAPI.payments(paymentRequest)
186186
.then(paymentResponse => console.log(paymentResponse.pspReference))
187187
.catch(error => console.log(error));
188188
```
@@ -225,7 +225,7 @@ Alternatively, you can use the `Types` included in this module for Typescript an
225225
merchantAccount: "YOUR_MERCHANT_ACCOUNT"
226226
};
227227
const checkoutAPI = new CheckoutAPI(client);
228-
const paymentResponse : Types.checkout.PaymentResponse = await checkoutAPI.payments(paymentsRequest);
228+
const paymentResponse : Types.checkout.PaymentResponse = await checkoutAPI.PaymentsAPI.payments(paymentsRequest);
229229
console.log(paymentResponse.pspReference);
230230
}
231231

0 commit comments

Comments
 (0)