내 PayPal iOS SDK를 내 앱에 통합했습니다. 참조 번호는 here입니다. 새로운 SDK는 설치가 쉽고 3 가지 환경에서 작업 할 수 있습니다. 1.) PayPalEnvrionmentNoNetwork 2.) PayPalEnvironmentSandBox 및 3) 라이브 서버에 갈 환경적인 의미가 없습니다. NoNetwork 환경에서는 모의 더미 데이터를 사용하기 때문에 모든 서버에 액세스하지 않아도됩니다. 이 내 옆 또는 그들의에 문제가있는 경우새로운 PayPal iOS SDK (베타) - 샌드 박스에 연결할 수 없습니다.
We're Sorry
There was a problem communicating with the PayPal servers. [Cancel][Try Again]
잘 모르겠어요 : 나는 샌드 박스 환경으로 전환 할 때 페이팔은 서버에 연결할 수 없습니다, 나는 다음과 같은 오류가 발생합니다. 다음은 구성입니다 :
이#define kPayPalClientId @"AbRN_BAV7YMsvde9KUFPsbSC_72NA9swMcY-j0QZL629lXrjSc9CNwfFn8Ac"
#define kPayPalReceiverEmail @"The email I use to login into PayPal"
- (IBAction)pay {
PayPalPayment *payment = [[PayPalPayment alloc] init];
payment.amount = [[NSDecimalNumber alloc] initWithString:@"14.99"];
payment.currencyCode = @"USD";
payment.shortDescription = @"Testing.";
if (!payment.processable) {
// This particular payment will always be processable. If, for
// example, the amount was negative or the shortDescription was
// empty, this payment wouldn't be processable, and you'd want
// to handle that here.
}
// Any customer identifier that you have will work here. Do NOT use a device- or
// hardware-based identifier.
NSString *customerId = nil;
// Set the environment:
// - For live charges, use PayPalEnvironmentProduction (default).
// - To use the PayPal sandbox, use PayPalEnvironmentSandbox.
// - For testing, use PayPalEnvironmentNoNetwork.
[PayPalPaymentViewController setEnvironment:self.environment];
PayPalPaymentViewController *paymentViewController = [[PayPalPaymentViewController alloc] initWithClientId:kPayPalClientId
receiverEmail:kPayPalReceiverEmail
payerId:customerId
payment:payment
delegate:self];
paymentViewController.hideCreditCardButton = NO;
[self presentViewController:paymentViewController animated:YES completion:nil];
}
FIX : 마지막으로 내가 문제를 파악, 당신이보기로드 한 후이를 추가해야합니다. 나는 이것을 전혀 가지고 있지 않았다.
[PayPalPaymentViewController prepareForPaymentUsingClientId:kPayPalClientId];
여기에서 재현 할 수 없습니다. 시뮬레이터 또는 장치에 있습니까? iOS 버전은 무엇입니까? 또한 FYI,'client_id'는 공용 신임 정보이므로 원하는 경우 공유하는 것이 안전합니다. (앱에 포함 된 것도 비밀이 아닙니다.) –
device, iOS 6.0. 클라이언트 ID를 업데이트했습니다. – TMan
그런데 문제가 무엇인지 확신 할 수 없습니다. – TMan