-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for IP field on source creation. (#77)
## Description Added support for IP field on source creation. Sample code ``` package main import ( "log" "github.com/omise/omise-go" "github.com/omise/omise-go/operations" ) const ( // Read these from environment variables or configuration files! OmisePublicKey = "<PKEY>" OmiseSecretKey = "<SKEY>" ) func main() { client, e := omise.NewClient(OmisePublicKey, OmiseSecretKey) if e != nil { log.Fatal(e) } // Creates a source from the token source, createSource := &omise.Source{}, &operations.CreateSource{ Amount: 100000, // ฿ 1,000.00 Currency: "thb", Type: "wechat_pay", Ip: "192.168.1.1", } if e := client.Do(source, createSource); e != nil { log.Fatal(e) } log.Printf("source: %s amount: %s %d\n", source.ID, source.Currency, source.Amount) log.Printf("IP: %s\n", source.Ip) } ``` ## Rollback procedure `default rollback procedure` --------- Co-authored-by: Aashish <[email protected]>
- Loading branch information
1 parent
d891b6d
commit a73b37f
Showing
4 changed files
with
22 additions
and
2 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"currency": "MYR", | ||
"email": "[email protected]", | ||
"flow": "redirect", | ||
"ip": "192.168.1.1", | ||
"installment_term": null, | ||
"name": null, | ||
"mobile_number": null, | ||
|