php - address verification with USA credit card -


i want check whether user entered address correct credit card details, don't want charge user verify credit card address. have tried verify address using stripe: http://stripe.com/docs/api#create_card_token when retrieve token address fields returns null.

stripe\token json: { "id": "tok_15xbrlbohzkqwmnn8j62vizn", "livemode": false, "created": 1430376391, "used": false, "object": "token", "type": "card", "card": {     "id": "card_15xbrlbohzkqwmnnfnlqkusp",     "object": "card",     "last4": "4242",     "brand": "visa",     "funding": "credit",     "exp_month": 8,     "exp_year": 2016,     "country": "us",     "name": null,     "address_line1": null,     "address_line2": null,     "address_city": null,     "address_state": null,     "address_zip": null,     "address_country": null,     "cvc_check": null,     "address_line1_check": null,     "address_zip_check": null,     "dynamic_last4": null,     "metadata": {     }   } } 

you never entered address when created card object, there no address verified.

after create card object, update add user's address, , address_line1_check should pass or fail.

\stripe\stripe::setapikey("sk_test_blahblah");  $cu = \stripe\customer::retrieve("cus_blahblah"); $card = $cu->sources->retrieve("card_blahblah"); $card->address_line1 = "123 bumbleberry road"; $card->address_city = "ridgewood"; $card->address_state = "nj"; $card->address_zip = "07450"; $card->address_country = "us"; $card->save(); 

https://stripe.com/docs/api#update_card


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -