Beispiel #1
0
            public override async void DetachSourceFromCustomer(ISTPSourceProtocol source, STPErrorBlock completion)
            {
                var result = await _stripeRemoteService.DetachSourceFromCustomer(source.StripeID);

                if (completion != null)
                {
                    completion(result ? null : new NSError());
                }
            }
        public async void AttachSourceToCustomer(ISTPSourceProtocol source, STPErrorBlock completion)
        {
            var kv = new KeyValuePair <string, string>[] {
                new KeyValuePair <string, string>("source", source.StripeID)
            };
            var json = await client.PostAsync("/customer/sources", new FormUrlEncodedContent(kv));

            completion(null);
        }
Beispiel #3
0
            public override async void AttachSourceToCustomer(ISTPSourceProtocol source, STPErrorBlock completion)
            {
                var result = await _stripeRemoteService.AttachSourceToCustomer(source.StripeID);

                completion(result ? null : new NSError());
            }