-
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.
- Loading branch information
1 parent
df8dc95
commit c049f8f
Showing
6 changed files
with
34 additions
and
8 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
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 |