Refactor STPTestPaymentAuthorizationViewController to be more fully-featured

This updates both STPTestPaymentAuthorizationViewController to more closely resemble PKPaymentAuthorizationViewController and makes the example app somewhat more powerful/realistic.

@raycmorgan - we should go through this and make sure if it works similarly to PKPaymentAuthorizationViewController. I'm specifically curious about when `controller:didSelectShippingAddress` gets called, and thus how the initial array of `paymentSummaryItems` gets populated.
Cool. That's a very good habit, by the way : )

On Thu, Oct 9, 2014 at 3:36 PM, Nate Racklyeft <notifications@github.com>
wrote:

> In Example/ApplePayStubs/STPTestAddressStore.m:
>
> > +
> > +- (ABRecordRef)contactForSelectedItemObscure:(BOOL)obscure {
> > +    id item = self.selectedItem;
> > +    ABRecordRef record = ABPersonCreate();
> > +
> > +    // address
> > +    ABMutableMultiValueRef address = ABMultiValueCreateMutable(kABDictionaryPropertyType);
> > +    CFStringRef keys[5];
> > +    CFStringRef values[5];
> > +
> > +    keys[0] = kABPersonAddressStreetKey;
> > +    keys[1] = kABPersonAddressCityKey;
> > +    keys[2] = kABPersonAddressStateKey;
> > +    keys[3] = kABPersonAddressZIPKey;
> > +    keys[4] = kABPersonAddressCountryKey;
> > +    values[0] = obscure ? CFSTR("") : CFBridgingRetain(item[@"line1"]);
>
> I have a habit of reading the diffs for every pod update in our project,
> which is how I came across your PR (and your request for feedback on the
> delegate behavior). I haven't tried using the ApplePayStubs package yet,
> though. I'd be happy to leave feedback in the form of GH issues as it comes!
> … <#148f6a0cdbf9f32e_>
> On Thu, Oct 9, 2014 at 1:12 PM, Jack Flintermann <notifications@github.com>
> wrote: In Example/ApplePayStubs/STPTestAddressStore.m: > + > +-
> (ABRecordRef)contactForSelectedItemObscure:(BOOL)obscure { > + id item =
> self.selectedItem; > + ABRecordRef record = ABPersonCreate(); > + > + //
> address > + ABMutableMultiValueRef address =
> ABMultiValueCreateMutable(kABDictionaryPropertyType); > + CFStringRef
> keys[5]; > + CFStringRef values[5]; > + > + keys[0] =
> kABPersonAddressStreetKey; > + keys[1] = kABPersonAddressCityKey; > +
> keys[2] = kABPersonAddressStateKey; > + keys[3] = kABPersonAddressZIPKey; >
> + keys[4] = kABPersonAddressCountryKey; > + values[0] = obscure ? CFSTR("")
> : CFBridgingRetain(item[@"line1"]); Thanks so much Nate! Incidentally,
> since you're the first person to comment on this feature: do you find this
> useful? Anything we can do to make it better? … <#148f68a6d0a3df2d_> On
> Thu, Oct 9, 2014 at 12:30 PM, Nate Racklyeft <notifications@github.com>
> wrote: In Example/ApplePayStubs/STPTestAddressStore.m: > + > +-
> (ABRecordRef)contactForSelectedItemObscure:(BOOL)obscure { > + id item =
> self.selectedItem; > + ABRecordRef record = ABPersonCreate(); > + > + //
> address > + ABMutableMultiValueRef address =
> ABMultiValueCreateMutable(kABDictionaryPropertyType); > + CFStringRef
> keys[5]; > + CFStringRef values[5]; > + > + keys[0] =
> kABPersonAddressStreetKey; > + keys[1] = kABPersonAddressCityKey; > +
> keys[2] = kABPersonAddressStateKey; > + keys[3] = kABPersonAddressZIPKey; >
> + keys[4] = kABPersonAddressCountryKey; > + values[0] = obscure ? CFSTR("")
> : CFBridgingRetain(item[@"line1"]); Done, thanks! Will send a PR if time
> allows. — Reply to this email directly or view it on GitHub <
> https://github.com/stripe/stripe-ios/pull/75/files#r18668449>. — Reply to
> this email directly or view it on GitHub <
> https://github.com/stripe/stripe-ios/pull/75/files#r18670873>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/stripe/stripe-ios/pull/75/files#r18672421>.
>