-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from PaystackOSS/patch/webview-guide
update webview guide code snippet
- Loading branch information
Showing
8 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
const sh = `curl https://api.paystack.co/transaction/initialize | ||
-H "Authorization: Bearer YOUR_SECRET_KEY" | ||
-H "Content-Type: application/json" | ||
-d '{ "email": "[email protected]", "amount": "20000" }' | ||
-d '{ "email": "[email protected]", "amount": "20000", | ||
"callback_url":"https://hello.pstk.xyz/callback", | ||
"metadata":{"cancel_action": "https://your-cancel-url.com"} | ||
}' | ||
-X POST` | ||
|
||
const js = `const https = require('https') | ||
const params = JSON.stringify({ | ||
"email": "[email protected]", | ||
"amount": "20000" | ||
"amount": "20000", | ||
"callback_url":"https://hello.pstk.xyz/callback", | ||
"metadata":{"cancel_action": "https://your-cancel-url.com"} | ||
}) | ||
const options = { | ||
|
@@ -44,7 +49,9 @@ const php = `<?php | |
$fields = [ | ||
'email' => "[email protected]", | ||
'amount' => "20000" | ||
'amount' => "20000", | ||
'callback_url' => "https://hello.pstk.xyz/callback", | ||
'metadata' => ["cancel_action" => "https://your-cancel-url.com"] | ||
]; | ||
$fields_string = http_build_query($fields); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,9 @@ const https = require('https') | |
|
||
const params = JSON.stringify({ | ||
"email": "[email protected]", | ||
"amount": "20000" | ||
"amount": "20000", | ||
"callback_url":"https://hello.pstk.xyz/callback", | ||
"metadata":{"cancel_action": "https://your-cancel-url.com"} | ||
}) | ||
|
||
const options = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
|
||
$fields = [ | ||
'email' => "[email protected]", | ||
'amount' => "20000" | ||
'amount' => "20000", | ||
'callback_url' => "https://hello.pstk.xyz/callback", | ||
'metadata' => ["cancel_action" => "https://your-cancel-url.com"] | ||
]; | ||
|
||
$fields_string = http_build_query($fields); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
curl https://api.paystack.co/transaction/initialize | ||
-H "Authorization: Bearer YOUR_SECRET_KEY" | ||
-H "Content-Type: application/json" | ||
-d '{ "email": "[email protected]", "amount": "20000" }' | ||
-d '{ "email": "[email protected]", "amount": "20000", | ||
"callback_url":"https://hello.pstk.xyz/callback", | ||
"metadata":{"cancel_action": "https://your-cancel-url.com"} | ||
}' | ||
-X POST |