0

error:

collection element of type nsuinteger aka unsigned long is not an objective c object

I am trying to make an http request to stripe. This is what the params look like

@"card": card.number, @"exp_month": card.expMonth, @"exp_year": card.expYear, @"cvc": card.cvc

The card.expMonth is whats causing the error. I tried adding (unsigned long) infront, but got the error

collection element of type 'unsigned long' is not an objective c object

What can I do to send the month element?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
madgrand
  • 121
  • 1
  • 8

1 Answers1

1

The "code" you posted isn't very clear. But it seems that card.expMonth is an NSUInteger. You need to wrap such primitive types in NSNumber objects.

Do that by changing:

card.expMonth

to

@(card.expMonth)

Do this for any of the values that represent a primitive number type.

rmaddy
  • 314,917
  • 42
  • 532
  • 579