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

PowerBuilder 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

 

 

 

(PowerBuilder) CardConnect Funding

Demonstrates how to get the merchant funding information.

The funding endpoint provides merchant funding information supported by supplemental transaction and funding adjustment detail. This information is provided by the host payment processing platform (for example, First Data Omaha). ...

See https://developer.cardconnect.com/cardconnect-api?lang=json#funding

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Http
integer li_Success
string ls_Url
string ls_ResponseStr
oleobject loo_JsonResp
integer li_Fundingmasterid
string ls_Fundingdate
string ls_Datechanged
string ls_Merchid
integer i
integer li_Count_i
string ls_Amount
integer li_Fundingadjustmentid
string ls_Description
string ls_Currency
string ls_Category
string ls_V_type
string ls_Dateadded
integer li_Fundingid
string ls_Netsales
string ls_Totalfunding
string ls_Fee
string ls_Deposittrancode
string ls_Ddanumber
string ls_Thirdparty
string ls_Reversal
string ls_Interchangefee
string ls_Adjustment
string ls_Depositachtracenumber
string ls_Servicecharge
string ls_Otheradjustment
string ls_Abanumber
string ls_Date
string ls_Downgradereasoncodes
string ls_Cardproc
string ls_Sourcetransactionid
integer li_Batchid
string ls_Respcode
string ls_Interchangeunitfee
string ls_Authcode
string ls_Plancode
integer li_Authdate
integer li_Fundingtxnid
string ls_Cardbrand
string ls_Terminalnumber
string ls_Cardnumber
string ls_Cardtype
string ls_Retref
string ls_Status
string ls_Interchangepercentfee
string ls_Invoicenumber

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_Http.BasicAuth = 1
loo_Http.Login = "API_USERNAME"
loo_Http.Password = "API_PASSWORD"

ls_Url = "https://<site>.cardconnect.com:<port>/cardconnect/rest/funding?merchid=<merchid>&date=<MMDD>"
ls_ResponseStr = loo_Http.QuickGetStr(ls_Url)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    return
end if

// A response status of 200 indicates potential success.  The JSON response body
// must be examined to determine if it was truly successful or an error.
Write-Debug "response status code = " + string(loo_Http.LastStatus)

loo_JsonResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JsonResp.ConnectToNewObject("Chilkat.JsonObject")

loo_JsonResp.Load(ls_ResponseStr)
loo_JsonResp.EmitCompact = 0

Write-Debug "response JSON:"
Write-Debug loo_JsonResp.Emit()

// A successful response looks like this:

// ------
// See the parsing code below...
// ------

// {
//   "fundingmasterid": 1121753252164835,
//   "fundingdate": "2019-04-22",
//   "adjustments": [
//     {
//       "fundingmasterid": 1121753252164835,
//       "amount": "-44.98",
//       "datechanged": "2019-04-22",
//       "fundingadjustmentid": 1121754400164838,
//       "description": "THE CARDHOLDER DID NOT AUTHORIZE THE CHARGE.",
//       "currency": "USD",
//       "category": "REVERSAL",
//       "type": "CHARGEBACKS/CHARGEBACK REVERSALS",
//       "dateadded": "2019-04-22",
//       "merchid": "MERCHANT_ID"
//     },
//     {
//       "fundingmasterid": 1121753252164835,
//       "amount": "-32.96",
//       "datechanged": "2019-04-22",
//       "fundingadjustmentid": 1121754401164838,
//       "description": "THIRD PARTY ADJUSTMENTS",
//       "currency": "USD",
//       "category": "THIRD PARTY",
//       "type": "THIRD PARTY ADJUSTMENTS",
//       "dateadded": "2019-04-22",
//       "merchid": "MERCHANT_ID"
//     }
//   ],
//   "datechanged": null,
//   "fundings": [
//     {
//       "fundingid": 1121753284164836,
//       "netsales": "129453.03",
//       "totalfunding": "129375.09",
//       "fee": "0",
//       "datechanged": "2019-04-22",
//       "deposittrancode": null,
//       "ddanumber": "3300770540",
//       "thirdparty": "-32.96",
//       "dateadded": "2019-04-22",
//       "fundingmasterid": 1121753252164835,
//       "reversal": "-44.98",
//       "interchangefee": "0",
//       "adjustment": "0",
//       "currency": "USD",
//       "depositachtracenumber": null,
//       "servicecharge": "0",
//       "otheradjustment": "0",
//       "abanumber": "121140399"
//     }
//   ],
//   "merchid": "MERCHANT_ID",
//   "txns": [
//     {
//       "date": "2019-04-19",
//       "amount": "76.75",
//       "downgradereasoncodes": null,
//       "fundingid": 1121753409164836,
//       "cardproc": "FNOR",
//       "sourcetransactionid": null,
//       "type": "SALE",
//       "batchid": 1900942289,
//       "respcode": "00",
//       "interchangeunitfee": "0",
//       "authcode": "PPS209",
//       "plancode": null,
//       "authdate": 20190419194808,
//       "fundingtxnid": 1121753252164835,
//       "cardbrand": "VISA",
//       "currency": "USD",
//       "terminalnumber": null,
//       "cardnumber": "42XXXXXXXXXX4242",
//       "cardtype": "Credit",
//       "retref": "109624271288",
//       "status": "Processed",
//       "interchangepercentfee": "0",
//       "invoicenumber": null
//     },
//     {
//       "date": "2019-04-19",
//       "amount": "9.99",
//       "downgradereasoncodes": null,
//       "fundingid": 1121753410164836,
//       "cardproc": "FNOR",
//       "sourcetransactionid": null,
//       "type": "SALE",
//       "batchid": 1900942289,
//       "respcode": "00",
//       "interchangeunitfee": "0",
//       "authcode": "PPS009",
//       "plancode": null,
//       "authdate": 20190419201502,
//       "fundingtxnid": 1121753252164835,
//       "cardbrand": "VISA",
//       "currency": "USD",
//       "terminalnumber": null,
//       "cardnumber": "47XXXXXXXXXX1443",
//       "cardtype": "Credit",
//       "retref": "109638272902",
//       "status": "Processed",
//       "interchangepercentfee": "0",
//       "invoicenumber": null
//     }
//   ]
// }
// 

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

li_Fundingmasterid = loo_JsonResp.IntOf("fundingmasterid")
ls_Fundingdate = loo_JsonResp.StringOf("fundingdate")
ls_Datechanged = loo_JsonResp.StringOf("datechanged")
ls_Merchid = loo_JsonResp.StringOf("merchid")
i = 0
li_Count_i = loo_JsonResp.SizeOfArray("adjustments")
do while i < li_Count_i
    loo_JsonResp.I = i
    li_Fundingmasterid = loo_JsonResp.IntOf("adjustments[i].fundingmasterid")
    ls_Amount = loo_JsonResp.StringOf("adjustments[i].amount")
    ls_Datechanged = loo_JsonResp.StringOf("adjustments[i].datechanged")
    li_Fundingadjustmentid = loo_JsonResp.IntOf("adjustments[i].fundingadjustmentid")
    ls_Description = loo_JsonResp.StringOf("adjustments[i].description")
    ls_Currency = loo_JsonResp.StringOf("adjustments[i].currency")
    ls_Category = loo_JsonResp.StringOf("adjustments[i].category")
    ls_V_type = loo_JsonResp.StringOf("adjustments[i].type")
    ls_Dateadded = loo_JsonResp.StringOf("adjustments[i].dateadded")
    ls_Merchid = loo_JsonResp.StringOf("adjustments[i].merchid")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResp.SizeOfArray("fundings")
do while i < li_Count_i
    loo_JsonResp.I = i
    li_Fundingid = loo_JsonResp.IntOf("fundings[i].fundingid")
    ls_Netsales = loo_JsonResp.StringOf("fundings[i].netsales")
    ls_Totalfunding = loo_JsonResp.StringOf("fundings[i].totalfunding")
    ls_Fee = loo_JsonResp.StringOf("fundings[i].fee")
    ls_Datechanged = loo_JsonResp.StringOf("fundings[i].datechanged")
    ls_Deposittrancode = loo_JsonResp.StringOf("fundings[i].deposittrancode")
    ls_Ddanumber = loo_JsonResp.StringOf("fundings[i].ddanumber")
    ls_Thirdparty = loo_JsonResp.StringOf("fundings[i].thirdparty")
    ls_Dateadded = loo_JsonResp.StringOf("fundings[i].dateadded")
    li_Fundingmasterid = loo_JsonResp.IntOf("fundings[i].fundingmasterid")
    ls_Reversal = loo_JsonResp.StringOf("fundings[i].reversal")
    ls_Interchangefee = loo_JsonResp.StringOf("fundings[i].interchangefee")
    ls_Adjustment = loo_JsonResp.StringOf("fundings[i].adjustment")
    ls_Currency = loo_JsonResp.StringOf("fundings[i].currency")
    ls_Depositachtracenumber = loo_JsonResp.StringOf("fundings[i].depositachtracenumber")
    ls_Servicecharge = loo_JsonResp.StringOf("fundings[i].servicecharge")
    ls_Otheradjustment = loo_JsonResp.StringOf("fundings[i].otheradjustment")
    ls_Abanumber = loo_JsonResp.StringOf("fundings[i].abanumber")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResp.SizeOfArray("txns")
do while i < li_Count_i
    loo_JsonResp.I = i
    ls_Date = loo_JsonResp.StringOf("txns[i].date")
    ls_Amount = loo_JsonResp.StringOf("txns[i].amount")
    ls_Downgradereasoncodes = loo_JsonResp.StringOf("txns[i].downgradereasoncodes")
    li_Fundingid = loo_JsonResp.IntOf("txns[i].fundingid")
    ls_Cardproc = loo_JsonResp.StringOf("txns[i].cardproc")
    ls_Sourcetransactionid = loo_JsonResp.StringOf("txns[i].sourcetransactionid")
    ls_V_type = loo_JsonResp.StringOf("txns[i].type")
    li_Batchid = loo_JsonResp.IntOf("txns[i].batchid")
    ls_Respcode = loo_JsonResp.StringOf("txns[i].respcode")
    ls_Interchangeunitfee = loo_JsonResp.StringOf("txns[i].interchangeunitfee")
    ls_Authcode = loo_JsonResp.StringOf("txns[i].authcode")
    ls_Plancode = loo_JsonResp.StringOf("txns[i].plancode")
    li_Authdate = loo_JsonResp.IntOf("txns[i].authdate")
    li_Fundingtxnid = loo_JsonResp.IntOf("txns[i].fundingtxnid")
    ls_Cardbrand = loo_JsonResp.StringOf("txns[i].cardbrand")
    ls_Currency = loo_JsonResp.StringOf("txns[i].currency")
    ls_Terminalnumber = loo_JsonResp.StringOf("txns[i].terminalnumber")
    ls_Cardnumber = loo_JsonResp.StringOf("txns[i].cardnumber")
    ls_Cardtype = loo_JsonResp.StringOf("txns[i].cardtype")
    ls_Retref = loo_JsonResp.StringOf("txns[i].retref")
    ls_Status = loo_JsonResp.StringOf("txns[i].status")
    ls_Interchangepercentfee = loo_JsonResp.StringOf("txns[i].interchangepercentfee")
    ls_Invoicenumber = loo_JsonResp.StringOf("txns[i].invoicenumber")
    i = i + 1
loop


destroy loo_Http
destroy loo_JsonResp

 

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