Leandros
Leandros

Reputation: 16825

PayPal iOS SDK authorization payment

I want to do authorization payments with the PayPal iOS SDK, but it seems like PayPal is ignoring the intent i'am providing.

I'am setting the intent to authorize

[payment setIntent:PayPalPaymentIntentAuthorize];

but the object always return a sale payment.

Confirmation: {
  "client" : {
    "environment" : "mock",
    "product_name" : "PayPal iOS SDK",
    "paypal_sdk_version" : "2.1.0",
    "platform" : "iOS"
  },
  "response_type" : "payment",
  "response" : {
    "id" : "PAY-6RV70583SB702805EKEYSZ6Y",
    "state" : "approved",
    "create_time" : "2014-07-01T17:11:11Z",
    "intent" : "sale"
  }
}

Any way to fix this?

Upvotes: 3

Views: 739

Answers (1)

Dave Goldman
Dave Goldman

Reputation: 2257

Dave from PayPal here.

When you are running in the "Mock" environment, you will always get back the same response, regardless of the details of your requested payment.

If you set your environment to "Sandbox" you should get back a response that correctly reflects your payment request.

Upvotes: 5

Related Questions