rest - Getting HTTP response from balanced -


if using php code such

$card = balanced\card::get("/v1/marketplaces/test-mp4k6k0pwgyptxl4lz42sqsb/cards/cc5n3hhudrayvhnwqooud3ux"); $card->unstore(); 

or

$customer->addcard($card) 

how read http response balanced know if has worked or error is?

the balanced client libraries written throw exceptions if there non 2xx http response api.

the correct way tell if addcard operation failed example write code looks like

try {     $customer->addcard($card) } catch (balanced\error $e) {     echo 'caught exception: ',  $e->getmessage(), "\n"; } 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -