Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Visual Basic 6.0 Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(Visual Basic 6.0) ClickBank Parse Instant Notification JSON

Demonstrates how to parse the JSON of a ClickBank instant notification.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Dim json As New ChilkatJsonObject

success = json.Load("{  ...  }")

' Use this online tool to generate parsing code from sample JSON: 
' Generate Parsing Code from JSON

' See the parsing code below..

' Sample notification JSON: 

' {
'     "transactionTime": "2016-06-05T13:47:51-06:00",
'     "receipt": "CWOGBZLN",
'     "transactionType": "SALE",
'     "vendor": "testacct",
'     "affiliate": "affiliate1",
'     "role": "VENDOR",
'     "totalAccountAmount": 0.00,
'     "paymentMethod": "VISA",
'     "totalOrderAmount": 0.00,
'     "totalTaxAmount": 0.00,
'     "totalShippingAmount": 0.00,
'     "currency": "USD",
'     "orderLanguage": "EN",
'     "trackingCodes": [
'         "tracking_code"
'     ],
'     "lineItems": [
'         {
'             "itemNo": "1",
'             "productTitle": "Product Title",
'             "shippable": false,
'             "recurring": false,
'             "accountAmount": 5.00,
'             "quantity": 1,
'             "downloadUrl": "<download_url>"
'             "lineItemType": "CART"
'        }
'         {
'             "itemNo": "2",
'             "productTitle": "Second Product",
'             "shippable": false,
'             "recurring": true,
'             "accountAmount": 2.99,
'             "quantity": 1,
'             "downloadUrl": "<download_url>"
'             "lineItemType": "CART"
'        }
' 
'     ],
'      "customer": {
'         "shipping": {
'             "firstName": "TEST",
'             "lastName": "GUY",
'             "fullName": "Test Guy",
'             "phoneNumber": "",
'             "email": "test@example.net",
'             "address": {
'                 "address1": "12 Test Lane",
'                 "address2": "Suite 100",
'                 "city": "LAS VEGAS",
'                 "county": "LAS VEGAS",
'                 "state": "NV",
'                 "postalCode": "89101",
'                 "country": "US"
'             }
'         },
'         "billing": {
'             "firstName": "TEST",
'             "lastName": "GUY",
'             "fullName": "Test Guy",
'             "phoneNumber": "",
'             "email": "test@example.net",
'             "address": {
'                 "state": "NV",
'                 "postalCode": "89101",
'                 "country": "US"
'             }
'         }
'     },
'      "upsell": {
'         "upsellOriginalReceipt": "XXXXXXXX",
'         "upsellFlowId": 55,
'         "upsellSession": "VVVVVVVVVV",
'         "upsellPath": "upsell_path"
'     },
'      "hopfeed": {
'         "hopfeedClickId": "hopfeed_click",
'         "hopfeedApplicationId": 0000,
'         "hopfeedCreativeId": 0000,
'         "hopfeedApplicationPayout": 0.00,
'         "hopfeedVendorPayout": 0.00
'     },
'      "version": 6.0,
'     "attemptCount": 1,
'      "vendorVariables": {
'        "v1": "variable1", 
'        "v2": "variable2" 
'     }
'  }
' 
' 

Dim transactionTime As String
Dim receipt As String
Dim transactionType As String
Dim vendor As String
Dim affiliate As String
Dim role As String
Dim totalAccountAmount As String
Dim paymentMethod As String
Dim totalOrderAmount As String
Dim totalTaxAmount As String
Dim totalShippingAmount As String
Dim currency As String
Dim orderLanguage As String
Dim customerShippingFirstName As String
Dim customerShippingLastName As String
Dim customerShippingFullName As String
Dim customerShippingPhoneNumber As String
Dim customerShippingEmail As String
Dim customerShippingAddressAddress1 As String
Dim customerShippingAddressAddress2 As String
Dim customerShippingAddressCity As String
Dim customerShippingAddressCounty As String
Dim customerShippingAddressState As String
Dim customerShippingAddressPostalCode As String
Dim customerShippingAddressCountry As String
Dim customerBillingFirstName As String
Dim customerBillingLastName As String
Dim customerBillingFullName As String
Dim customerBillingPhoneNumber As String
Dim customerBillingEmail As String
Dim customerBillingAddressState As String
Dim customerBillingAddressPostalCode As String
Dim customerBillingAddressCountry As String
Dim upsellUpsellOriginalReceipt As String
Dim upsellUpsellFlowId As Long
Dim upsellUpsellSession As String
Dim upsellUpsellPath As String
Dim hopfeedHopfeedClickId As String
Dim hopfeedHopfeedApplicationId As Long
Dim hopfeedHopfeedCreativeId As Long
Dim hopfeedHopfeedApplicationPayout As String
Dim hopfeedHopfeedVendorPayout As String
Dim version As String
Dim attemptCount As Long
Dim vendorVariablesV1 As String
Dim vendorVariablesV2 As String
Dim i As Long
Dim count_i As Long
Dim strVal As String
Dim itemNo As String
Dim productTitle As String
Dim shippable As Long
Dim recurring As Long
Dim accountAmount As String
Dim quantity As Long
Dim downloadUrl As String
Dim lineItemType As String

transactionTime = json.StringOf("transactionTime")
receipt = json.StringOf("receipt")
transactionType = json.StringOf("transactionType")
vendor = json.StringOf("vendor")
affiliate = json.StringOf("affiliate")
role = json.StringOf("role")
totalAccountAmount = json.StringOf("totalAccountAmount")
paymentMethod = json.StringOf("paymentMethod")
totalOrderAmount = json.StringOf("totalOrderAmount")
totalTaxAmount = json.StringOf("totalTaxAmount")
totalShippingAmount = json.StringOf("totalShippingAmount")
currency = json.StringOf("currency")
orderLanguage = json.StringOf("orderLanguage")
customerShippingFirstName = json.StringOf("customer.shipping.firstName")
customerShippingLastName = json.StringOf("customer.shipping.lastName")
customerShippingFullName = json.StringOf("customer.shipping.fullName")
customerShippingPhoneNumber = json.StringOf("customer.shipping.phoneNumber")
customerShippingEmail = json.StringOf("customer.shipping.email")
customerShippingAddressAddress1 = json.StringOf("customer.shipping.address.address1")
customerShippingAddressAddress2 = json.StringOf("customer.shipping.address.address2")
customerShippingAddressCity = json.StringOf("customer.shipping.address.city")
customerShippingAddressCounty = json.StringOf("customer.shipping.address.county")
customerShippingAddressState = json.StringOf("customer.shipping.address.state")
customerShippingAddressPostalCode = json.StringOf("customer.shipping.address.postalCode")
customerShippingAddressCountry = json.StringOf("customer.shipping.address.country")
customerBillingFirstName = json.StringOf("customer.billing.firstName")
customerBillingLastName = json.StringOf("customer.billing.lastName")
customerBillingFullName = json.StringOf("customer.billing.fullName")
customerBillingPhoneNumber = json.StringOf("customer.billing.phoneNumber")
customerBillingEmail = json.StringOf("customer.billing.email")
customerBillingAddressState = json.StringOf("customer.billing.address.state")
customerBillingAddressPostalCode = json.StringOf("customer.billing.address.postalCode")
customerBillingAddressCountry = json.StringOf("customer.billing.address.country")
upsellUpsellOriginalReceipt = json.StringOf("upsell.upsellOriginalReceipt")
upsellUpsellFlowId = json.IntOf("upsell.upsellFlowId")
upsellUpsellSession = json.StringOf("upsell.upsellSession")
upsellUpsellPath = json.StringOf("upsell.upsellPath")
hopfeedHopfeedClickId = json.StringOf("hopfeed.hopfeedClickId")
hopfeedHopfeedApplicationId = json.IntOf("hopfeed.hopfeedApplicationId")
hopfeedHopfeedCreativeId = json.IntOf("hopfeed.hopfeedCreativeId")
hopfeedHopfeedApplicationPayout = json.StringOf("hopfeed.hopfeedApplicationPayout")
hopfeedHopfeedVendorPayout = json.StringOf("hopfeed.hopfeedVendorPayout")
version = json.StringOf("version")
attemptCount = json.IntOf("attemptCount")
vendorVariablesV1 = json.StringOf("vendorVariables.v1")
vendorVariablesV2 = json.StringOf("vendorVariables.v2")
i = 0
count_i = json.SizeOfArray("trackingCodes")
Do While i < count_i
    json.I = i
    strVal = json.StringOf("trackingCodes[i]")
    i = i + 1
Loop
i = 0
count_i = json.SizeOfArray("lineItems")
Do While i < count_i
    json.I = i
    itemNo = json.StringOf("lineItems[i].itemNo")
    productTitle = json.StringOf("lineItems[i].productTitle")
    shippable = json.BoolOf("lineItems[i].shippable")
    recurring = json.BoolOf("lineItems[i].recurring")
    accountAmount = json.StringOf("lineItems[i].accountAmount")
    quantity = json.IntOf("lineItems[i].quantity")
    downloadUrl = json.StringOf("lineItems[i].downloadUrl")
    lineItemType = json.StringOf("lineItems[i].lineItemType")
    i = i + 1
Loop

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.