 
 /**
  Apple Pay details for the purchase
+ This class fetch information from Passkit PKPayment and adapt it to Bluesnap API call
  */
 @objc public class BSApplePaySdkResult: BSBaseSdkResult {
     

            return "prepaid"
        case .store:
            return "store"
        }
    }
}

    public init(payment:PKPayment)
    {
        self.payment = payment;
        self.token = payment.token
        self.tokenPaymentNetwork = payment.token.paymentMethod.network?.rawValue;
        self.transactionId = payment.token.transactionIdentifier;
        self.tokenInstrumentName = payment.token.paymentMethod.displayName;
        self.billingContact = payment.billingContact;
        self.shippingContact = payment.shippingContact;
        self.tokenPaymentNetworkType = payment.token.paymentMethod.type.description
    }
}

extension BSApplePayInfo: DictionaryConvertible
{

    public func toDictionary() throws -> [String: Any] {

        let desrilaziedToken = try JSONSerialization.jsonObject(with: payment.token.paymentData, options: JSONSerialization.ReadingOptions())

        let shippingContactDict = [
                "familyName": shippingContact?.name?.familyName ?? "",
                "givenName": shippingContact?.name?.givenName ?? "",
                /**
                These are unused by the API and should not be sent, otherwise API call might fail.
                */
                //"addressLines": shippingContact?.postalAddress?.description,
                //"country": shippingContact?.postalAddress?.country,
                //"countryCode": shippingContact?.postalAddress?.isoCountryCode,
                //"locality": shippingContact?.postalAddress?.street,
                //"emailAddress": shippingContact?.emailAddress,
                //"phoneNumber": shippingContact?.phoneNumber?.stringValue,
