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 FoxPro 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 FoxPro) 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

LOCAL loJson
LOCAL lcTransactionTime
LOCAL lcReceipt
LOCAL lcTransactionType
LOCAL lcVendor
LOCAL lcAffiliate
LOCAL lcRole
LOCAL lcTotalAccountAmount
LOCAL lcPaymentMethod
LOCAL lcTotalOrderAmount
LOCAL lcTotalTaxAmount
LOCAL lcTotalShippingAmount
LOCAL lcCurrency
LOCAL lcOrderLanguage
LOCAL lcCustomerShippingFirstName
LOCAL lcCustomerShippingLastName
LOCAL lcCustomerShippingFullName
LOCAL lcCustomerShippingPhoneNumber
LOCAL lcCustomerShippingEmail
LOCAL lcCustomerShippingAddressAddress1
LOCAL lcCustomerShippingAddressAddress2
LOCAL lcCustomerShippingAddressCity
LOCAL lcCustomerShippingAddressCounty
LOCAL lcCustomerShippingAddressState
LOCAL lcCustomerShippingAddressPostalCode
LOCAL lcCustomerShippingAddressCountry
LOCAL lcCustomerBillingFirstName
LOCAL lcCustomerBillingLastName
LOCAL lcCustomerBillingFullName
LOCAL lcCustomerBillingPhoneNumber
LOCAL lcCustomerBillingEmail
LOCAL lcCustomerBillingAddressState
LOCAL lcCustomerBillingAddressPostalCode
LOCAL lcCustomerBillingAddressCountry
LOCAL lcUpsellUpsellOriginalReceipt
LOCAL lnUpsellUpsellFlowId
LOCAL lcUpsellUpsellSession
LOCAL lcUpsellUpsellPath
LOCAL lcHopfeedHopfeedClickId
LOCAL lnHopfeedHopfeedApplicationId
LOCAL lnHopfeedHopfeedCreativeId
LOCAL lcHopfeedHopfeedApplicationPayout
LOCAL lcHopfeedHopfeedVendorPayout
LOCAL lcVersion
LOCAL lnAttemptCount
LOCAL lcVendorVariablesV1
LOCAL lcVendorVariablesV2
LOCAL i
LOCAL lnCount_i
LOCAL lcStrVal
LOCAL lcItemNo
LOCAL lcProductTitle
LOCAL lnShippable
LOCAL lnRecurring
LOCAL lcAccountAmount
LOCAL lnQuantity
LOCAL lcDownloadUrl
LOCAL lcLineItemType

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')

loJson.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" 
*     }
*  }
* 
* 

lcTransactionTime = loJson.StringOf("transactionTime")
lcReceipt = loJson.StringOf("receipt")
lcTransactionType = loJson.StringOf("transactionType")
lcVendor = loJson.StringOf("vendor")
lcAffiliate = loJson.StringOf("affiliate")
lcRole = loJson.StringOf("role")
lcTotalAccountAmount = loJson.StringOf("totalAccountAmount")
lcPaymentMethod = loJson.StringOf("paymentMethod")
lcTotalOrderAmount = loJson.StringOf("totalOrderAmount")
lcTotalTaxAmount = loJson.StringOf("totalTaxAmount")
lcTotalShippingAmount = loJson.StringOf("totalShippingAmount")
lcCurrency = loJson.StringOf("currency")
lcOrderLanguage = loJson.StringOf("orderLanguage")
lcCustomerShippingFirstName = loJson.StringOf("customer.shipping.firstName")
lcCustomerShippingLastName = loJson.StringOf("customer.shipping.lastName")
lcCustomerShippingFullName = loJson.StringOf("customer.shipping.fullName")
lcCustomerShippingPhoneNumber = loJson.StringOf("customer.shipping.phoneNumber")
lcCustomerShippingEmail = loJson.StringOf("customer.shipping.email")
lcCustomerShippingAddressAddress1 = loJson.StringOf("customer.shipping.address.address1")
lcCustomerShippingAddressAddress2 = loJson.StringOf("customer.shipping.address.address2")
lcCustomerShippingAddressCity = loJson.StringOf("customer.shipping.address.city")
lcCustomerShippingAddressCounty = loJson.StringOf("customer.shipping.address.county")
lcCustomerShippingAddressState = loJson.StringOf("customer.shipping.address.state")
lcCustomerShippingAddressPostalCode = loJson.StringOf("customer.shipping.address.postalCode")
lcCustomerShippingAddressCountry = loJson.StringOf("customer.shipping.address.country")
lcCustomerBillingFirstName = loJson.StringOf("customer.billing.firstName")
lcCustomerBillingLastName = loJson.StringOf("customer.billing.lastName")
lcCustomerBillingFullName = loJson.StringOf("customer.billing.fullName")
lcCustomerBillingPhoneNumber = loJson.StringOf("customer.billing.phoneNumber")
lcCustomerBillingEmail = loJson.StringOf("customer.billing.email")
lcCustomerBillingAddressState = loJson.StringOf("customer.billing.address.state")
lcCustomerBillingAddressPostalCode = loJson.StringOf("customer.billing.address.postalCode")
lcCustomerBillingAddressCountry = loJson.StringOf("customer.billing.address.country")
lcUpsellUpsellOriginalReceipt = loJson.StringOf("upsell.upsellOriginalReceipt")
lnUpsellUpsellFlowId = loJson.IntOf("upsell.upsellFlowId")
lcUpsellUpsellSession = loJson.StringOf("upsell.upsellSession")
lcUpsellUpsellPath = loJson.StringOf("upsell.upsellPath")
lcHopfeedHopfeedClickId = loJson.StringOf("hopfeed.hopfeedClickId")
lnHopfeedHopfeedApplicationId = loJson.IntOf("hopfeed.hopfeedApplicationId")
lnHopfeedHopfeedCreativeId = loJson.IntOf("hopfeed.hopfeedCreativeId")
lcHopfeedHopfeedApplicationPayout = loJson.StringOf("hopfeed.hopfeedApplicationPayout")
lcHopfeedHopfeedVendorPayout = loJson.StringOf("hopfeed.hopfeedVendorPayout")
lcVersion = loJson.StringOf("version")
lnAttemptCount = loJson.IntOf("attemptCount")
lcVendorVariablesV1 = loJson.StringOf("vendorVariables.v1")
lcVendorVariablesV2 = loJson.StringOf("vendorVariables.v2")
i = 0
lnCount_i = loJson.SizeOfArray("trackingCodes")
DO WHILE i < lnCount_i
    loJson.I = i
    lcStrVal = loJson.StringOf("trackingCodes[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJson.SizeOfArray("lineItems")
DO WHILE i < lnCount_i
    loJson.I = i
    lcItemNo = loJson.StringOf("lineItems[i].itemNo")
    lcProductTitle = loJson.StringOf("lineItems[i].productTitle")
    lnShippable = loJson.BoolOf("lineItems[i].shippable")
    lnRecurring = loJson.BoolOf("lineItems[i].recurring")
    lcAccountAmount = loJson.StringOf("lineItems[i].accountAmount")
    lnQuantity = loJson.IntOf("lineItems[i].quantity")
    lcDownloadUrl = loJson.StringOf("lineItems[i].downloadUrl")
    lcLineItemType = loJson.StringOf("lineItems[i].lineItemType")
    i = i + 1
ENDDO

RELEASE loJson


 

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