I want to test apple pay feature ,I don't want to use my own debit or credit card for testing.Does apple provide any sandbox environmnet for testing or any other approach to test apple pay feature?
How to test apple pay feature without a real debit or credit card?
Due to the nature of how Apple Pay works, when you implement it in your project your card will not actually get charged (even though you'll see a notification that you did). Your payment token gets passed into the didAuthorizePayment delegate function, so it really depends on what your code is doing there. If it's not really doing anything, then do not fret, your card is not getting charged 🙂 Typically you would implement the mentioned delegate method such that it passes the payment token to some sort of Payment Platform you'll have set up that actually processes the charge. However depending on the payment platform you use, you could create a sandbox environment in there so that your card will not be charged.
Take a look at the Ray Wenderlich's guide for Apple Pay, it'll give you step by step instructions on how to set Apple Pay up and how to set up a sandbox environment on the payment platform so that your credit card doesn't get charged.