Move error checking to right place.
Move error checking to right place.

WPTechInnovation/worldpay-within-sdk,WPTechInnovation/worldpay-within-sdk,WPTechInnovation/worldpay-within-sdk,WPTechInnovation/worldpay-within-sdk,WPTechInnovation/worldpay-within-sdk,WPTechInnovation/worldpay-within-sdk