Skip to content

Commit

Permalink
Merge pull request #11 from TransbankDevelopers/feat/improve-operatio…
Browse files Browse the repository at this point in the history
…n-flow

feat: improve operation flow
  • Loading branch information
Matiasnickolas authored Oct 9, 2024
2 parents cae6dbf + d197077 commit c709bf7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/WebpayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public function create()
{

$createTx = [
'buyOrder' => "O-" . rand(1, 10000),
"sessionId" => "S-" . rand(1, 10000),
'buyOrder' => "O-" . random_int(1, 10000),
"sessionId" => "S-" . random_int(1, 10000),
'returnUrl' => url('/') . '/webpay-plus/commit',
'amount' => rand(1000, 2000)
'amount' => random_int(1000, 2000)
];


Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/WebpayPlusDeferredController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public function create()
{

$createTx = [
'buyOrder' => "O-" . rand(1, 10000),
"sessionId" => "S-" . rand(1, 10000),
'buyOrder' => "O-" . random_int(1, 10000),
"sessionId" => "S-" . random_int(1, 10000),
'returnUrl' => url('/') . '/webpay-plus-diferido/commit',
'amount' => rand(1000, 2000)
'amount' => random_int(1000, 2000)
];


Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/WebpayPlusMallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ public function create()
{

$createTx = [
"buy_order" => "O-" . rand(1, 10000),
"session_id" => "S-" . rand(1, 10000),
"buy_order" => "O-" . random_int(1, 10000),
"session_id" => "S-" . random_int(1, 10000),
"return_url" => url("/") . "/webpay-mall/commit",
"details" => [
[
"amount" => 10000,
"commerce_code" => 597055555536,
"buy_order" => "ordenCompraDetalle1234"
"buy_order" => "ordenCompraDetalle" . random_int(1, 10000)
],
[
"amount" => 12000,
"commerce_code" => 597055555537,
"buy_order" => "ordenCompraDetalle4321"
"buy_order" => "ordenCompraDetalle" . random_int(1, 10000)
],
]
];
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/WebpayPlusMallDeferredController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ public function create()
{

$createTx = [
'buy_order' => "O-" . rand(1, 10000),
"session_id" => "S-" . rand(1, 10000),
'buy_order' => "O-" . random_int(1, 10000),
"session_id" => "S-" . random_int(1, 10000),
'return_url' => url('/') . '/webpay-mall-diferido/commit',
'details' => [
[
"amount" => 10000,
"commerce_code" => 597055555582,
"buy_order" => "ordenCompraDetalle" . rand(1, 10000)
"buy_order" => "ordenCompraDetalle" . random_int(1, 10000)
],
[
"amount" => 12000,
"commerce_code" => 597055555583,
"buy_order" => "ordenCompraDetalle" . rand(1, 10000)
"buy_order" => "ordenCompraDetalle" . random_int(1, 10000)
],
]
];
Expand Down

0 comments on commit c709bf7

Please sign in to comment.