Skip to content

Commit

Permalink
add pay view render docs
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed Jun 13, 2020
1 parent ece98e8 commit 5707a51
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
13 changes: 11 additions & 2 deletions README-FA.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ $invoice = (new Invoice)->amount(1000);
// You should use return statement to redirect user to the bank page.
return Payment::purchase($invoice, function($driver, $transactionId) {
// Store transactionId in database as we need it to verify payment in the future.
})->pay();
})->pay()->render();

// Do all things together in a single line.
return Payment::purchase(
Expand All @@ -256,7 +256,16 @@ return Payment::purchase(
// Store transactionId in database.
// We need the transactionId to verify payment in the future.
}
)->pay();
)->pay()->render();

// Retrieve json format of Redirection (in this case you can handle redirection to bank gateway)
return Payment::purchase(
(new Invoice)->amount(1000),
function($driver, $transactionId) {
// Store transactionId in database.
// We need the transactionId to verify payment in the future.
}
)->pay()->toJson();
```

<div dir="rtl">
Expand Down
13 changes: 11 additions & 2 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ $invoice = (new Invoice)->amount(1000);
// You should use return statement to redirect user to the bank page.
return Payment::purchase($invoice, function($driver, $transactionId) {
// Store transactionId in database as we need it to verify payment in the future.
})->pay();
})->pay()->render();

// Do all things together in a single line.
return Payment::purchase(
Expand All @@ -243,7 +243,16 @@ return Payment::purchase(
// 把交易ID保存到数据库.
// 在接下来的付款中,我们需要验证交易ID
}
)->pay();
)->pay()->render();

// Retrieve json format of Redirection (in this case you can handle redirection to bank gateway)
return Payment::purchase(
(new Invoice)->amount(1000),
function($driver, $transactionId) {
// 把交易ID保存到数据库.
// 在接下来的付款中,我们需要验证交易ID
}
)->pay()->toJson();
```

#### 验证付款
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ $invoice = (new Invoice)->amount(1000);
// You should use return statement to redirect user to the bank page.
return Payment::purchase($invoice, function($driver, $transactionId) {
// Store transactionId in database as we need it to verify payment in the future.
})->pay();
})->pay()->render();

// Do all things together in a single line.
return Payment::purchase(
Expand All @@ -242,7 +242,16 @@ return Payment::purchase(
// Store transactionId in database.
// We need the transactionId to verify payment in the future.
}
)->pay();
)->pay()->render();

// Retrieve json format of Redirection (in this case you can handle redirection to bank gateway)
return Payment::purchase(
(new Invoice)->amount(1000),
function($driver, $transactionId) {
// Store transactionId in database.
// We need the transactionId to verify payment in the future.
}
)->pay()->toJson();
```

#### Verify payment
Expand Down

0 comments on commit 5707a51

Please sign in to comment.