Jump to content

HGRogers

Members
  • Content Count

    9
  • Joined

  • Last visited

Everything posted by HGRogers

  1. Hi I'm going round in circles trying to pass an array parameter to a REST server the required json structure of the params looks like this { "payment_method": [ "credit-card", "open-banking" ], "transaction_type": "SALE", "full_name": "Joe Blogs", "email": etc etc } Using a TRESTRequest adding those parameters with name : value pairs is easy. For the array parameter I've tried the RESTRequest.Params.Options of poFlatArray or poListArray with various combinations of double quotes commas curly and square braces without success Any pointers as to how I add the required array parameter gratefully received. The approach below I found on Stackoverflow looked promising but my Delphi (10.4) wont accept a string as the parameter to TJSONObject.ParseJSONValue() ?? (That's despite the prototype in system.json having a version of ParseJsonValue that does take a string) var aParam: TRESTRequestParameter; begin aParam := RestReq.Params.AddItem(); //don't care about setting a name for it aParam.Value := TJSONObject.ParseJSONValue('{"payment_method":["credit-card","open-banking"]}'); ...... RestClient.Execute(); end;
  2. I know we are now rather off topic but thanks for the additional insight. All the best
  3. SOLVED Should anyone embark upon using the blink payment api. When using TRESTRequest The Header parameter used for all calls after a Token is obtained is called 'Authorization' not Authentication as shown at https://api-docs.blinkpayment.co.uk/apidocs/tokens and it requires poDoNotEncode e.g. req.Params[0].Value := 'Bearer ' + theAccessToken ;
  4. Thank you Remy - I've got both approaches working - But : As soon as I supply enough parameters to satisfy the API I'm getting a '500 Internal Server Error' code. So not sure where to go from here. Using an echo server rather than the real endpoint I see all the JSON appears well formed and I'm assured by the Server developers that the calls made in their sandbox and live app (which can be tried live via their developers site) are identical to the calls I'm making with Delphi.
  5. Wow That's marvellous Thank you I'll give it a go. All the best
  6. HI I'm getting [Fatal Error] Can't load package IcsCommonNewDesign$(Auto).bpl. The system cannot find the file specified When trying to install ICS V9.1 into D10.4 - The BPLS are however successfully all created in C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl with the suffix 270 [which apparently is the 'package version' for 'product version' 21.0 - Delphi 10.4] e.g. C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\IcsCommonNewDesign270.bpl is built when I click on Build in the project Manager pane. (same behaviour for IcsCommonNewRun and IcsVclNewRun and IcsVclNewDesign) I guess there is some path definition missing or incorrect - any help would be gratefully received - I have followed all the steps in the install doc ReadMe9.txt from scratch (3 times now) Many thanks
  7. HGRogers

    Install ICS V9.1 in D10.4

    Thanks for the update. Grateful to get such rapid and inciteful support. All the best
  8. HGRogers

    Install ICS V9.1 in D10.4

    I can't find any occurrence of the string '$(Auto)' in any of the path statements/lists I'm afraid. If anyone has a similar issue here is what I did to get to a solution, Set the project options (as well as the IDE options) search path to C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl for each off IcsCommonNewRun and IcsVclNewRun and IcsCommonNewDesign and IcsVclNewDesign in turn. They all now compile/build and the Designtime ones install BUT The BPL name in each case contains the string '$(Auto)' rather then the substituted package version number. e.g the built bpl filename is IcsCommonNewDesign$(Auto).bpl Renamed each bpl to the desired name e.g. IcsCommonNewDesign270.bpl I then used the package list [Component | Install Package] to add them to the IDE.
  9. HGRogers

    Install ICS V9.1 in D10.4

    Thank you for the rapid response. I've added C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl explicitly as the first entry in the Library path I get the same result as previously - where should I make any other changes ? Thanks again
×