MOdified code for fullAMount in pay API.