Skip to content

Commit

Permalink
Merge pull request #10 from Emitoz/master
Browse files Browse the repository at this point in the history
Update documentation for usage
  • Loading branch information
seerbit-developers authored Mar 27, 2024
2 parents 6ef77ba + e93ed04 commit 07d5a1e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,24 @@ class Standard
"tokenize" => true //optional
];

$trans = seerbit()->Standard()->Initialize($payload);
//Or with Facade

// Initialize the payment with the Facade
// Or with Facade
$trans = SeerBit::Standard()->Initialize($payload);

// You can get your redirect link for customer payment from $tran
$redirectLink = $trans['data']['payments']['redirectLink'];

// Redirect to this link in order to complete the transaction
if (!empty($redirectLink)) {
return redirect($redirectLink)->with("status", $trans['data']['message']);
} else {
// Something went wrong while initiating the transaction
return redirect()->back()->with('error', $trans['data']['message']);
}

}catch (\Exception $e){
;
// Handle exception handling
}
}
```
Expand Down

0 comments on commit 07d5a1e

Please sign in to comment.