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.
Both excellent points. Do you mind opening them as issues on
github.com/stripe/ApplePayStubs?

On Thu, Oct 9, 2014 at 11:20 AM, 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"]);
>
> It's a small nit, but could lead to a crash for developers who aren't
> expecting NULL to be returned from CFDictionaryGetValue(address,
> kABPersonAddressStreetKey)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/stripe/stripe-ios/pull/75/files#r18663738>.
>