`transactionReceipt` in `Order` on iOS deprecated

Đang mở
#15 3 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ios, typescript
Lĩnh vực
mobile, payments

Hướng nghiên cứu

Start by locating the iOS implementation of transactionReceipt and inspect how the plugin obtains and validates purchase receipts. Compare it with the issue's appStoreReceiptURL approach and verify the resulting receipt handling on supported iOS versions. Done means the deprecated SKPaymentTransaction property is no longer used and receipt retrieval remains functional.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I think the plugin uses the long ago deprecated transactionReceipt property on SKPaymentTransaction. It is actually deprecated since iOS 7.0 and can not be validated trough Apple Servers anymore for newer OS versions. I suggest the following implementation to obtain the receipt on iOS:

get transactionReceipt(): string {
  const receiptData = NSData.dataWithContentsOfURL(NSBundle.mainBundle.appStoreReceiptURL);
  if (receiptData) {
    return receiptData.base64EncodedStringWithOptions(0);
  }
  
  return null;
}
Ngôn ngữ chính
TypeScript
Star
35
Fork
13
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NativeScript/payments

Tất cả issue của NativeScript/payments

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.