我已经集成了我的mac应用程序与paddle,这是我遵循的文档和集成,但我想要的,当用户从这里购买时,我想要所有的订单细节。
// Your Paddle SDK Config from the Vendor Dashboard:
NSString* myPaddleProductID = @"12345";
NSString *myPaddleVendorID = @"56791";
NSString* myPaddleAPIKey = @"abc123def345hij678";
// Populate a local object in case we're unable to retrieve data
// from the Vendor Dashboard:
PADProductConfiguration *defaultProductConfig = [[PADProductConfiguration alloc] init];
defaultProductConfig.productName = @"My v4 Product";
defaultProductConfig.vendorName = @"My Company";
// Initialize the SDK Instance with Seller details:
Paddle *paddle = [Paddle sharedInstanceWithVendorID:myPaddleVendorID
apiKey:myPaddleAPIKey
productID:myPaddleProductID
configuration:defaultProductConfig];
// Initialize the Product you'd like to work with:
PADProduct *paddleProduct = [[PADProduct alloc] initWithProductID:myPaddleProductID productType:PADProductTypeSDKProduct configuration:nil];
// Ask the Product to get it's latest state and info from the Paddle Platform:
[paddleProduct refresh:^(NSDictionary * _Nullable productDelta, NSError * _Nullable error) {
// Launch the "Product Info" gatekeeper UI with buy, activate, etc:
[paddle showProductAccessDialogWithProduct:paddleProduct];但是,在使用下面的代码块进行自定义实现的文档中,我们可以通过使用showProductAccessDialogWithProduct获得
[paddle showCheckoutForProduct:paddleProduct options:nil checkoutStatusCompletion:^(PADCheckoutState state, NSDictionary * _Nullable checkoutData) {
// Examine checkout state to determine the checkout result
}];有什么建议吗?
提前感谢!!
发布于 2019-03-04 13:02:44
所以我在V4.0.9之前得到了答案,我们不能得到v4.0.10之后包含的细节。
你所需要的就是PADProductDelegate
-(void)productPurchased:(PADCheckoutData *)checkoutData
使用此委托方法,您可以获取checkoutdata,如果您需要订单详细信息,则从checkoutdata获取checkout_id并将其传递给下方的api。
https://checkout.paddle.com/api/1.0/order?checkout_id=xxxxxxxxx
https://stackoverflow.com/questions/54786275
复制相似问题