protected function _formatResult($response) {
		$result = array();
		foreach ($this->fields as $local => $stripe) {
			if (is_array($stripe)) {
				foreach ($stripe as $obj => $field) {
					if (isset($response->$obj->$field)) {
						$result[$local] = $response->$obj->$field;
					}
				}
			} else {
				if (isset($response->$stripe)) {
					$result[$local] = $response->$stripe;
				}
			}
		}
		// if no local fields match, return the default stripe_id
		if (empty($result)) {
			$result['stripe_id'] = $response->id;
		}
		return $result;
	}
protected function _formatResult($response) {
		$result = array();
		foreach ($this->fields as $local => $stripe) {
			if (is_array($stripe)) {
				foreach ($stripe as $obj => $field) {
					if (isset($response->$obj->$field)) {
						$result[$local] = $response->$obj->$field;
					}
				}
			} else {
				if (isset($response->$stripe)) {
					$result[$local] = $response->$stripe;
				}
			}
		}
		// if no local fields match, return the default stripe_id
		if (empty($result)) {
			$result['stripe_id'] = $response->id;
		}
		return $result;
	}
protected function _formatResult ( $ response ) { $ result = array ( ) ; foreach ( $ this -> fields as $ local => $ stripe ) { if ( is_array ( $ stripe ) ) { foreach ( $ stripe as $ obj => $ field ) { if ( isset ( $ response -> $ obj -> $ field ) ) { $ result [ $ local ] = $ response -> $ obj -> $ field ; } } } else { if ( isset ( $ response -> $ stripe ) ) { $ result [ $ local ] = $ response -> $ stripe ; } } } // if no local fields match, return the default stripe_id if ( empty ( $ result ) ) { $ result [ 'stripe_id' ] = $ response -> id ; } return $ result ; }
Returns an array of fields we want from Stripe's response objects


@param object $response A successful response object from this component.
@return array The desired fields from the response object as an array.
Returns an array of fields we want from Stripe s response objects