getSessionById
Bir ödeme oturumu nesnesini tanımlayıcısı ile alın. 🔐 Bu yöntem yetkilendirme gerektirir.
Açıklama
Bu yöntem, bir ödeme oturumu nesnesini tanımlayıcısı ile alır. Bir ödeme oturumu nesnesi ISessionEntity'ye çözülmekte olan bir Promise döndürür.
Ödemeler.getSessionById(
id*);
Parametreler şeması
Şema
id(zorunlu): number
Alınan ödeme oturumu nesnesinin tanımlayıcısı
örnek: 12345
Örnekler
Minimal örnek
const response = await Payments.getSessionById(1764);
Örnek yanıt
{
"id": 21,
"createdDate": "2025-02-26T10:13:16.839Z",
"updatedDate": "2025-02-26T10:13:16.839Z",
"type": "session",
"status": "waiting",
"paymentAccountId": 1,
"orderId": 43,
"amount": null,
"paymentUrl": null
}
Yanıt şeması
Şema: ISessionEntity
id: number
Nesne tanımlayıcısı.
örnek: 1764
createdDate: string
Nesne oluşturulma tarihi.
örnek: "2025-02-26T10:13:16.839Z"
updatedDate: string
Nesne güncellenme tarihi.
örnek: "2025-02-26T10:13:16.839Z"
type: 'session' | 'intent'
Tür 'session' veya 'intent' olabilir.
örnek: "session"
status: string
Ödeme durumu.
örnek: "completed"
paymentAccountId: number
Ödeme hesabı tanımlayıcısı.
örnek: 1
orderId: number
Sipariş tanımlayıcısı.
örnek: 1
paymentUrl: string | null
Ödeme bağlantısı.
örnek: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M"
amount: number | null
Ödeme oturumu tutarı.
örnek: 100
clientSecret: string
Bir oturum oluştururken ödeme sağlayıcısı (örneğin, Stripe) tarafından döndürülen istemci gizli anahtarı.
örnek: "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH"