本文整理汇总了C#中Braintree.NodeWrapper.GetNode方法的典型用法代码示例。如果您正苦于以下问题:C# NodeWrapper.GetNode方法的具体用法?C# NodeWrapper.GetNode怎么用?C# NodeWrapper.GetNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree.NodeWrapper
的用法示例。
在下文中一共展示了NodeWrapper.GetNode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreditCardVerification
public CreditCardVerification(NodeWrapper node, BraintreeGateway gateway)
{
if (node == null) return;
AvsErrorResponseCode = node.GetString("avs-error-response-code");
AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code");
AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code");
CvvResponseCode = node.GetString("cvv-response-code");
GatewayRejectionReason = (TransactionGatewayRejectionReason)CollectionUtil.Find(
TransactionGatewayRejectionReason.ALL,
node.GetString("gateway-rejection-reason"),
null
);
ProcessorResponseCode = node.GetString("processor-response-code");
ProcessorResponseText = node.GetString("processor-response-text");
MerchantAccountId = node.GetString("merchant-account-id");
Status = (VerificationStatus)CollectionUtil.Find(VerificationStatus.ALL, node.GetString("status"), VerificationStatus.UNRECOGNIZED);
Id = node.GetString("id");
BillingAddress = new Address(node.GetNode("billing"));
CreditCard = new CreditCard(node.GetNode("credit-card"), gateway);
CreatedAt = node.GetDateTime("created-at");
var riskDataNode = node.GetNode("risk-data");
if (riskDataNode != null) {
RiskData = new RiskData(riskDataNode);
}
}
示例2: MerchantAccount
protected internal MerchantAccount(NodeWrapper node)
{
Id = node.GetString("id");
CurrencyIsoCode = node.GetString("currency-iso-code");
Status = (MerchantAccountStatus) CollectionUtil.Find(MerchantAccountStatus.ALL, node.GetString("status"), null);
NodeWrapper masterNode = node.GetNode("master-merchant-account");
if (masterNode != null)
MasterMerchantAccount = new MerchantAccount(masterNode);
else
MasterMerchantAccount = null;
NodeWrapper individualNode = node.GetNode("individual");
if (individualNode != null)
IndividualDetails = new MerchantAccountIndividualDetails(individualNode);
else
IndividualDetails = null;
NodeWrapper businessNode = node.GetNode("business");
if (businessNode != null)
BusinessDetails = new MerchantAccountBusinessDetails(businessNode);
else
BusinessDetails = null;
NodeWrapper fundingNode = node.GetNode("funding");
if (fundingNode != null)
FundingDetails = new MerchantAccountFundingDetails(fundingNode);
else
FundingDetails = null;
}
示例3: MerchantAccountBusinessDetails
protected internal MerchantAccountBusinessDetails(NodeWrapper node)
{
DbaName = node.GetString("dba-name");
LegalName = node.GetString("legal-name");
TaxId = node.GetString("tax-id");
Address = new Address(node.GetNode("address"));
}
示例4: Merchant
public Merchant(NodeWrapper node)
{
if (node == null) return;
NodeWrapper merchantNode = node.GetNode("merchant");
Id = merchantNode.GetString("id");
Email = merchantNode.GetString("email");
CompanyName = merchantNode.GetString("company-name");
CountryCodeAlpha3 = merchantNode.GetString("country-code-alpha3");
CountryCodeAlpha2 = merchantNode.GetString("country-code-alpha2");
CountryCodeNumeric = merchantNode.GetString("country-code-numeric");
CountryName = merchantNode.GetString("country-name");
Credentials = new OAuthCredentials(node.GetNode("credentials"));
}
示例5: MerchantAccountIndividualDetails
protected internal MerchantAccountIndividualDetails(NodeWrapper node)
{
FirstName = node.GetString("first-name");
LastName = node.GetString("last-name");
Email = node.GetString("email");
Phone = node.GetString("phone");
DateOfBirth = node.GetString("date-of-birth");
SsnLastFour = node.GetString("ssn-last-4");
Address = new Address(node.GetNode("address"));
}
示例6: PaymentMethodNonce
protected internal PaymentMethodNonce(NodeWrapper node, BraintreeGateway gateway)
{
Nonce = node.GetString("nonce");
Type = node.GetString("type");
var threeDSecureInfoNode = node.GetNode("three-d-secure-info");
if (threeDSecureInfoNode != null && !threeDSecureInfoNode.IsEmpty()){
ThreeDSecureInfo = new ThreeDSecureInfo(threeDSecureInfoNode);
}
}
示例7: Dispute
public Dispute(NodeWrapper node)
{
Amount = node.GetDecimal("amount");
ReceivedDate = node.GetDateTime("received-date");
ReplyByDate = node.GetDateTime("reply-by-date");
Reason = (DisputeReason)CollectionUtil.Find(DisputeReason.ALL, node.GetString("reason"), DisputeReason.GENERAL);
Status = (DisputeStatus)CollectionUtil.Find(DisputeStatus.ALL, node.GetString("status"), DisputeStatus.UNRECOGNIZED);
CurrencyIsoCode = node.GetString("currency-iso-code");
Id = node.GetString("id");
TransactionDetails = new TransactionDetails(node.GetNode("transaction"));
}
示例8: Disbursement
public Disbursement(NodeWrapper node, BraintreeGateway gateway)
{
Id = node.GetString("id");
Amount = node.GetDecimal("amount");
ExceptionMessage = node.GetString("exception-message");
DisbursementDate = node.GetDateTime("disbursement-date");
FollowUpAction = node.GetString("follow-up-action");
MerchantAccount = new MerchantAccount(node.GetNode("merchant-account"));
TransactionIds = new List<string>();
foreach (var stringNode in node.GetList("transaction-ids/item"))
{
TransactionIds.Add(stringNode.GetString("."));
}
Success = node.GetBoolean("success");
Retry = node.GetBoolean("retry");
this.gateway = gateway;
}
示例9: WebhookNotification
public WebhookNotification(NodeWrapper node, BraintreeGateway gateway)
{
Timestamp = node.GetDateTime("timestamp");
Kind = (WebhookKind)CollectionUtil.Find(WebhookKind.ALL, node.GetString("kind"), WebhookKind.UNRECOGNIZED);
NodeWrapper WrapperNode = node.GetNode("subject");
if (WrapperNode.GetNode("api-error-response") != null) {
WrapperNode = WrapperNode.GetNode("api-error-response");
}
if (WrapperNode.GetNode("subscription") != null) {
Subscription = new Subscription(WrapperNode.GetNode("subscription"), gateway);
}
if (WrapperNode.GetNode("merchant-account") != null) {
MerchantAccount = new MerchantAccount(WrapperNode.GetNode("merchant-account"));
}
if (WrapperNode.GetNode("dispute") != null) {
Dispute = new Dispute(WrapperNode.GetNode("dispute"));
}
if (WrapperNode.GetNode("transaction") != null) {
Transaction = new Transaction(WrapperNode.GetNode("transaction"), gateway);
}
if (WrapperNode.GetNode("disbursement") != null) {
Disbursement = new Disbursement(WrapperNode.GetNode("disbursement"), gateway);
}
if (WrapperNode.GetNode("partner-merchant") != null) {
PartnerMerchant = new PartnerMerchant(WrapperNode.GetNode("partner-merchant"));
}
if (WrapperNode.GetNode("errors") != null) {
Errors = new ValidationErrors(WrapperNode.GetNode("errors"));
}
if (WrapperNode.GetNode("message") != null) {
Message = WrapperNode.GetString("message");
}
}
示例10: PopulateErrors
private void PopulateErrors(NodeWrapper node)
{
if (node.GetName() == "api-error-response")
{
node = node.GetNode("errors");
}
List<NodeWrapper> errorResponses = node.GetChildren();
foreach (var errorResponse in errorResponses)
{
if (errorResponse.GetName() != "errors")
{
nestedErrors[errorResponse.GetName()] = new ValidationErrors(errorResponse);
}
else
{
PopulateTopLevelErrors(errorResponse.GetList("error"));
}
}
}
示例11: Subscription
public Subscription(NodeWrapper node, BraintreeService service)
{
Balance = node.GetDecimal("balance");
BillingDayOfMonth = node.GetInteger("billing-day-of-month");
BillingPeriodEndDate = node.GetDateTime("billing-period-end-date");
BillingPeriodStartDate = node.GetDateTime("billing-period-start-date");
CurrentBillingCycle = node.GetInteger("current-billing-cycle");
DaysPastDue = node.GetInteger("days-past-due");
Descriptor = new Descriptor(node.GetNode("descriptor"));
FailureCount = node.GetInteger("failure-count");
FirstBillingDate = node.GetDateTime("first-billing-date");
Id = node.GetString("id");
NextBillAmount = node.GetDecimal("next-bill-amount");
NextBillingDate = node.GetDateTime("next-billing-date");
NextBillingPeriodAmount = node.GetDecimal("next-billing-period-amount");
NeverExpires = node.GetBoolean("never-expires");
NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles");
PaymentMethodToken = node.GetString("payment-method-token");
PaidThroughDate = node.GetDateTime("paid-through-date");
PlanId = node.GetString("plan-id");
Price = node.GetDecimal("price");
Status = (SubscriptionStatus)CollectionUtil.Find(SubscriptionStatus.STATUSES, node.GetString("status"), SubscriptionStatus.UNRECOGNIZED);
HasTrialPeriod = node.GetBoolean("trial-period");
TrialDuration = node.GetInteger("trial-duration");
String trialDurationUnitStr = node.GetString("trial-duration-unit");
if (trialDurationUnitStr != null) {
TrialDurationUnit = (SubscriptionDurationUnit)CollectionUtil.Find(SubscriptionDurationUnit.ALL, trialDurationUnitStr, SubscriptionDurationUnit.UNRECOGNIZED);
}
MerchantAccountId = node.GetString("merchant-account-id");
AddOns = new List<AddOn> ();
foreach (NodeWrapper addOnResponse in node.GetList("add-ons/add-on")) {
AddOns.Add(new AddOn(addOnResponse));
}
Discounts = new List<Discount> ();
foreach (NodeWrapper discountResponse in node.GetList("discounts/discount")) {
Discounts.Add(new Discount(discountResponse));
}
Transactions = new List<Transaction> ();
foreach (NodeWrapper transactionResponse in node.GetList("transactions/transaction")) {
Transactions.Add(new Transaction(transactionResponse, service));
}
}
示例12: CreditCard
protected internal CreditCard(NodeWrapper node, IBraintreeGateway gateway)
{
if (node == null) return;
Bin = node.GetString("bin");
CardholderName = node.GetString("cardholder-name");
CardType = (CreditCardCardType)CollectionUtil.Find(CreditCardCardType.ALL, node.GetString("card-type"), CreditCardCardType.UNRECOGNIZED);
CustomerId = node.GetString("customer-id");
IsDefault = node.GetBoolean("default");
IsVenmoSdk = node.GetBoolean("venmo-sdk");
ExpirationMonth = node.GetString("expiration-month");
ExpirationYear = node.GetString("expiration-year");
IsExpired = node.GetBoolean("expired");
CustomerLocation = (CreditCardCustomerLocation)CollectionUtil.Find(CreditCardCustomerLocation.ALL, node.GetString("customer-location"), CreditCardCustomerLocation.UNRECOGNIZED);
LastFour = node.GetString("last-4");
UniqueNumberIdentifier = node.GetString("unique-number-identifier");
Token = node.GetString("token");
CreatedAt = node.GetDateTime("created-at");
UpdatedAt = node.GetDateTime("updated-at");
BillingAddress = new Address(node.GetNode("billing-address"));
Prepaid = (CreditCardPrepaid)CollectionUtil.Find(CreditCardPrepaid.ALL, node.GetString("prepaid"), CreditCardPrepaid.UNKNOWN);
Payroll = (CreditCardPayroll)CollectionUtil.Find(CreditCardPayroll.ALL, node.GetString("payroll"), CreditCardPayroll.UNKNOWN);
DurbinRegulated = (CreditCardDurbinRegulated)CollectionUtil.Find(CreditCardDurbinRegulated.ALL, node.GetString("durbin-regulated"), CreditCardDurbinRegulated.UNKNOWN);
Debit = (CreditCardDebit)CollectionUtil.Find(CreditCardDebit.ALL, node.GetString("debit"), CreditCardDebit.UNKNOWN);
Commercial = (CreditCardCommercial)CollectionUtil.Find(CreditCardCommercial.ALL, node.GetString("commercial"), CreditCardCommercial.UNKNOWN);
Healthcare = (CreditCardHealthcare)CollectionUtil.Find(CreditCardHealthcare.ALL, node.GetString("healthcare"), CreditCardHealthcare.UNKNOWN);
_CountryOfIssuance = node.GetString("country-of-issuance");
_IssuingBank = node.GetString("issuing-bank");
ImageUrl = node.GetString("image-url");
var subscriptionXmlNodes = node.GetList("subscriptions/subscription");
Subscriptions = new Subscription[subscriptionXmlNodes.Count];
for (int i = 0; i < subscriptionXmlNodes.Count; i++)
{
Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], gateway);
}
var verificationNodes = node.GetList("verifications/verification");
Verification = FindLatestVerification(verificationNodes, gateway);
}
示例13: Transaction
internal Transaction(NodeWrapper node, BraintreeService service)
{
Service = service;
if (node == null) return;
Id = node.GetString("id");
Amount = node.GetDecimal("amount");
AvsErrorResponseCode = node.GetString("avs-error-response-code");
AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code");
AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code");
GatewayRejectionReason = (TransactionGatewayRejectionReason)CollectionUtil.Find(
TransactionGatewayRejectionReason.ALL,
node.GetString("gateway-rejection-reason"),
null
);
OrderId = node.GetString("order-id");
Status = (TransactionStatus)CollectionUtil.Find(TransactionStatus.ALL, node.GetString("status"), TransactionStatus.UNRECOGNIZED);
List<NodeWrapper> statusNodes = node.GetList("status-history/status-event");
StatusHistory = new StatusEvent[statusNodes.Count];
for (int i = 0; i < statusNodes.Count; i++)
{
StatusHistory[i] = new StatusEvent(statusNodes[i]);
}
Type = (TransactionType)CollectionUtil.Find(TransactionType.ALL, node.GetString("type"), TransactionType.UNRECOGNIZED);
MerchantAccountId = node.GetString("merchant-account-id");
ProcessorAuthorizationCode = node.GetString("processor-authorization-code");
ProcessorResponseCode = node.GetString("processor-response-code");
ProcessorResponseText = node.GetString("processor-response-text");
PurchaseOrderNumber = node.GetString("purchase-order-number");
RefundedTransactionId = node.GetString("refunded-transaction-id");
#pragma warning disable 0618
RefundId = node.GetString("refund-id");
#pragma warning restore 0618
RefundIds = node.GetStrings("refund-ids/*");
SettlementBatchId = node.GetString("settlement-batch-id");
SubscriptionId = node.GetString("subscription-id");
TaxAmount = node.GetDecimal("tax-amount");
TaxExempt = node.GetBoolean("tax-exempt");
CustomFields = node.GetDictionary("custom-fields");
CreditCard = new CreditCard(node.GetNode("credit-card"), service);
Subscription = new Subscription(node.GetNode("subscription"), service);
Customer = new Customer(node.GetNode("customer"), service);
CurrencyIsoCode = node.GetString("currency-iso-code");
CvvResponseCode = node.GetString("cvv-response-code");
Descriptor = new Descriptor(node.GetNode("descriptor"));
BillingAddress = new Address(node.GetNode("billing"));
ShippingAddress = new Address(node.GetNode("shipping"));
CreatedAt = node.GetDateTime("created-at");
UpdatedAt = node.GetDateTime("updated-at");
AddOns = new List<AddOn>();
foreach (NodeWrapper addOnResponse in node.GetList("add-ons/add-on")) {
AddOns.Add(new AddOn(addOnResponse));
}
Discounts = new List<Discount>();
foreach (NodeWrapper discountResponse in node.GetList("discounts/discount")) {
Discounts.Add(new Discount(discountResponse));
}
}
示例14: Transaction
protected internal Transaction(NodeWrapper node, BraintreeGateway gateway)
{
Gateway = gateway;
if (node == null) return;
Id = node.GetString("id");
Amount = node.GetDecimal("amount");
AvsErrorResponseCode = node.GetString("avs-error-response-code");
AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code");
AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code");
GatewayRejectionReason = (TransactionGatewayRejectionReason)CollectionUtil.Find(
TransactionGatewayRejectionReason.ALL,
node.GetString("gateway-rejection-reason"),
TransactionGatewayRejectionReason.UNRECOGNIZED
);
PaymentInstrumentType = (PaymentInstrumentType)CollectionUtil.Find(
PaymentInstrumentType.ALL,
node.GetString("payment-instrument-type"),
PaymentInstrumentType.UNKNOWN
);
Channel = node.GetString("channel");
OrderId = node.GetString("order-id");
Status = (TransactionStatus)CollectionUtil.Find(TransactionStatus.ALL, node.GetString("status"), TransactionStatus.UNRECOGNIZED);
EscrowStatus = (TransactionEscrowStatus)CollectionUtil.Find(
TransactionEscrowStatus.ALL,
node.GetString("escrow-status"),
TransactionEscrowStatus.UNRECOGNIZED
);
List<NodeWrapper> statusNodes = node.GetList("status-history/status-event");
StatusHistory = new StatusEvent[statusNodes.Count];
for (int i = 0; i < statusNodes.Count; i++)
{
StatusHistory[i] = new StatusEvent(statusNodes[i]);
}
Type = (TransactionType)CollectionUtil.Find(TransactionType.ALL, node.GetString("type"), TransactionType.UNRECOGNIZED);
MerchantAccountId = node.GetString("merchant-account-id");
ProcessorAuthorizationCode = node.GetString("processor-authorization-code");
ProcessorResponseCode = node.GetString("processor-response-code");
ProcessorResponseText = node.GetString("processor-response-text");
ProcessorSettlementResponseCode = node.GetString("processor-settlement-response-code");
ProcessorSettlementResponseText = node.GetString("processor-settlement-response-text");
AdditionalProcessorResponse = node.GetString("additional-processor-response");
VoiceReferralNumber = node.GetString("voice-referral-number");
PurchaseOrderNumber = node.GetString("purchase-order-number");
Recurring = node.GetBoolean("recurring");
RefundedTransactionId = node.GetString("refunded-transaction-id");
#pragma warning disable 0618
RefundId = node.GetString("refund-id");
#pragma warning restore 0618
RefundIds = node.GetStrings("refund-ids/*");
PartialSettlementTransactionIds = node.GetStrings("partial-settlement-transaction-ids/*");
AuthorizedTransactionId = node.GetString("authorized-transaction-id");
SettlementBatchId = node.GetString("settlement-batch-id");
PlanId = node.GetString("plan-id");
SubscriptionId = node.GetString("subscription-id");
TaxAmount = node.GetDecimal("tax-amount");
TaxExempt = node.GetBoolean("tax-exempt");
CustomFields = node.GetDictionary("custom-fields");
CreditCard = new CreditCard(node.GetNode("credit-card"), gateway);
Subscription = new Subscription(node.GetNode("subscription"), gateway);
Customer = new Customer(node.GetNode("customer"), gateway);
CurrencyIsoCode = node.GetString("currency-iso-code");
CvvResponseCode = node.GetString("cvv-response-code");
Descriptor = new Descriptor(node.GetNode("descriptor"));
ServiceFeeAmount = node.GetDecimal("service-fee-amount");
DisbursementDetails = new DisbursementDetails(node.GetNode("disbursement-details"));
var paypalNode = node.GetNode("paypal");
if (paypalNode != null)
{
PayPalDetails = new PayPalDetails(paypalNode);
}
var coinbaseNode = node.GetNode("coinbase-account");
if (coinbaseNode != null)
{
CoinbaseDetails = new CoinbaseDetails(coinbaseNode);
}
var applePayNode = node.GetNode("apple-pay");
if (applePayNode != null)
{
ApplePayDetails = new ApplePayDetails(applePayNode);
}
var androidPayNode = node.GetNode("android-pay-card");
if (androidPayNode != null)
{
AndroidPayDetails = new AndroidPayDetails(androidPayNode);
}
BillingAddress = new Address(node.GetNode("billing"));
ShippingAddress = new Address(node.GetNode("shipping"));
CreatedAt = node.GetDateTime("created-at");
UpdatedAt = node.GetDateTime("updated-at");
AddOns = new List<AddOn>();
foreach (var addOnResponse in node.GetList("add-ons/add-on")) {
//.........这里部分代码省略.........
示例15: CreditCard
internal CreditCard(NodeWrapper node, BraintreeService service)
{
if (node == null) return;
Bin = node.GetString("bin");
CardholderName = node.GetString("cardholder-name");
CardType = (CreditCardCardType)CollectionUtil.Find(CreditCardCardType.ALL, node.GetString("card-type"), CreditCardCardType.UNRECOGNIZED);
CustomerId = node.GetString("customer-id");
IsDefault = node.GetBoolean("default");
ExpirationMonth = node.GetString("expiration-month");
ExpirationYear = node.GetString("expiration-year");
IsExpired = node.GetBoolean("expired");
CustomerLocation = (CreditCardCustomerLocation)CollectionUtil.Find(CreditCardCustomerLocation.ALL, node.GetString("customer-location"), CreditCardCustomerLocation.UNRECOGNIZED);
LastFour = node.GetString("last-4");
Token = node.GetString("token");
CreatedAt = node.GetDateTime("created-at");
UpdatedAt = node.GetDateTime("updated-at");
BillingAddress = new Address(node.GetNode("billing-address"));
var subscriptionXmlNodes = node.GetList("subscriptions/subscription");
Subscriptions = new Subscription[subscriptionXmlNodes.Count];
for (int i = 0; i < subscriptionXmlNodes.Count; i++)
{
Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], service);
}
}