大家好,我遇到了贝宝代表的问题-
(void)paymentSuccessWithKey:(NSString *)payKey andStatus:(PayPalPaymentStatus)paymentStatus {
事务成功并结束时永远不会调用。这是我的代码
- (void)viewDidLoad
{
[super viewDidLoad];
[PayPal initializeWithAppID:kPayPalAPI
forEnvironment:ENV_SANDBOX];
// Do any additional setup after loading the view from its nib.
}
-(IBAction)payWithPayPal{
PayPalPayment *payment = [[[PayPalPayment alloc] init] autorelease];
payment.recipient = @"xxxx@mail.com";
payment.paymentCurrency = @"EUR";
payment.description =[NSString stringWithFormat:@"test tetst %@",stest];
payment.merchantName = @"Test product";
//subtotal of all items, without tax and shipping
payment.subTotal = [NSDecimalNumber decimalNumberWithString:txtMontant.text];
PayPalInvoiceItem *item = [[[PayPalInvoiceItem alloc] init] autorelease];
item.totalPrice = payment.subTotal;
item.name = @"Test";
[payment.invoiceData.invoiceItems addObject:item];
[[PayPal getPayPalInst] checkoutWithPayment:payment];
}
我已经这样设置了代表ViewController : UIViewController<UITextFieldDelegate,PayPalPaymentDelegate>
。我有什么遗漏吗?