Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
orkhanahmadov committed Nov 11, 2020
1 parent 31a9d78 commit ae3eb3f
Showing 1 changed file with 14 additions and 29 deletions.
43 changes: 14 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,7 @@ Gets information on previously created payment. Accepts single argument:
``` php
$product = Product::first();
$yandexCheckout = app(YandexCheckoutService::class);
$payment = $yandexCheckout->createPayment(
$product,
CreatePaymentRequest::builder()->build([
'amount' => [
'value' => 49.99,
'currency' => 'RUB',
],
'confirmation' => [
'type' => 'redirect',
'return_url' => 'https://example.com',
],
'capture' => true,
'description' => 'Payment for product: ' . $product->id,
]
);
$payment = $yandexCheckout->createPayment($product, ...);

$paymentInfo = $yandexCheckout->paymentInfo($payment);
// or
Expand Down Expand Up @@ -188,20 +174,19 @@ By using `HandlesYandexCheckout` your model also gets access to payment related
``` php
$product = Product::first();

$product->createPayment(
CreatePaymentRequest::builder()->build([
'amount' => [
'value' => 49.99,
'currency' => 'RUB',
],
'confirmation' => [
'type' => 'redirect',
'return_url' => 'https://example.com',
],
'capture' => true,
'description' => 'Payment for product: ' . $product->id,
]
);
$paymentRequest = CreatePaymentRequest::builder()->build([
'amount' => [
'value' => 49.99,
'currency' => 'RUB',
],
'confirmation' => [
'type' => 'redirect',
'return_url' => 'https://example.com',
],
'capture' => true,
'description' => 'Payment for product: ' . $product->id,
]);
$product->createPayment($paymentRequest);
```

#### `yandexCheckouts()`
Expand Down

0 comments on commit ae3eb3f

Please sign in to comment.