November 2017
Intermediate to advanced
670 pages
17h 35m
English
The ChargeCard function is a helper function used by the Charge filter to charge the credit card number found in the order. This implementation simply prints that the credit card was charged. It's a good placeholder for a real charge credit card logic:
func ChargeCard(ccardNo string, amount gc.USD) { fmt.Printf("Credit card %v%v charged %v\n", gu.Dashes(len(ccardNo)-4, "X"), ccardNo[len(ccardNo)-4:], amount) }