before updating stripe library
This commit is contained in:
parent
f58e1bc40b
commit
4a998b5925
|
|
@ -35,7 +35,7 @@ func getstripepaymentintentHandler(response http.ResponseWriter, request *http.R
|
|||
amount := 0
|
||||
for _, tracker := range trackers {
|
||||
items = strings.Split(tracker, ":")
|
||||
if len(items) == 2 {
|
||||
if len(items) >= 2 {
|
||||
abo_count, err := strconv.Atoi(items[1])
|
||||
if err == nil {
|
||||
abo_years += abo_count
|
||||
|
|
@ -78,7 +78,7 @@ func HandlePayment(user string, charge_data string, amount int64) {
|
|||
amount, _ := strconv.Atoi(res[2])
|
||||
fmt.Printf("prolongActivation %s: %d\n", deveui, years)
|
||||
prolongActivation(deveui, years)
|
||||
line := fmt.Sprintf("%-30s %20s %10.2f\n", getDevAlias(deveui), getActiveUntil(deveui), float64(amount / 100))
|
||||
line := fmt.Sprintf("%-30s %20s %10.2f\n", getDevAlias(deveui), getActiveUntil(deveui), float64(amount/100))
|
||||
charge_data_email_text = charge_data_email_text + line
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue