Jump to content

Search the Community

Showing results for tags 'Request'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


There are no results to display.


  • Welcome to Smart Mobile Studio
    • News and Information
    • Pre-Sales Questions
    • Smart In the Media
    • Smart Contests
    • Meta
  • Smart Mobile Studio Discussion
    • General
    • IDE
    • RTL
    • Code
    • Client Server
    • Platform
    • Graphics
    • Deployment
    • Suggestion box
  • Smart Mobile Studio support
    • Support
    • Bug report
  • General Discussion
    • Pascal
    • Delphi
    • Javascript
    • HTML/HTML5
    • CSS
  • Resources
    • Website
    • Download Smart Mobile Studio

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL



Company name


Found 2 results

  1. lynkfs

    Payment Request API

    HTML5.2 was introduced a month or 2 ago, with a couple of new features. One of them being the payment request api. So basically it provides all the forms necessary to display a checkout, capture card info, addresses and shipping costs etc. The api is implemented in Chrome and Edge, but doesn't work (yet) in Firefox. Forms in these browsers are rendered somewhat browser specific : This includes validity check of cc details etc. I suppose in time there will be a "W3C.payment" file included in the API's/W3C subdirectory to help with structuring the payment request constructor (hint) For now this works procedure TForm1.W3Button1Click(Sender: TObject); begin //set up merchant structure var supportedInstruments : array of variant; supportedInstruments[0] := class supportedMethods := 'basic-card'; data := class supportedNetworks : array of string; supportedTypes : array of string; end; end; //set up invoice structure var details := class total := class label : string; amount := class currency : string; value : string; end; end; displayItems : array of Variant; shippingOptions : array of variant; end; //set up options var options := class requestShipping := true; end; //populate merchant structure with supported cards supportedInstruments[0].data.supportedNetworks[0] := 'visa'; supportedInstruments[0].data.supportedNetworks[1] := 'mastercard'; supportedInstruments[0].data.supportedNetworks[2] := 'amex'; supportedInstruments[0].data.supportedNetworks[3] := 'jcb'; supportedInstruments[0].data.supportedNetworks[4] := 'diners'; supportedInstruments[0].data.supportedNetworks[5] := 'discover'; supportedInstruments[0].data.supportedNetworks[6] := 'mir'; supportedInstruments[0].data.supportedNetworks[7] := 'unionpay'; //populate merchant structure with supported card types supportedInstruments[0].data.supportedTypes[0] := 'credit'; supportedInstruments[0].data.supportedTypes[1] := 'debit'; //populate invoice structure with totals details.total.label := 'Payments invoice Q2018-02'; details.total.amount.currency := 'AUD'; details.total.amount.value := '230.00'; //populate invoice structure with line items var displayItems : array of variant; // displayItems[0] := new JObject; displayItems[0].label := 'labour hire'; displayItems[0].amount := new JObject; displayItems[0].amount.currency := 'AUD'; displayItems[0].amount.value := '65.00'; // displayItems[1] := new JObject; displayItems[1].label := 'material costs'; displayItems[1].amount := new JObject; displayItems[1].amount.currency := 'AUD'; displayItems[1].amount.value := '165.00'; // details.displayItems := displayItems; //populate invoice structure with shipping costs var shippingOptions : array of variant; shippingOptions[0] := new JObject; shippingOptions[0].id := 'standard'; shippingOptions[0].label := 'Standard shipping'; shippingOptions[0].amount := new JObject; shippingOptions[0].amount.currency := 'AUD'; shippingOptions[0].amount.value := '0.00'; details.shippingOptions := shippingOptions; //writeln(json.stringify(details)); //finally do a payment request var request : variant := new JObject; asm @request = new PaymentRequest(@supportedInstruments, @details, @options); end; request.show(details); // end; Does not work in the ide, starting from file system is ok
  2. IElite


    Is it possible to perform user authentication between client app and server using SMS? I want my app to authenticate with a server, and either return a JSON with a error message, or a JSON with user profile data. Is this possible? If so, what do I need on the server side to perform the request? e.g. this gets an HTML document from google FHttp.Get('http://www.google.com'); I want to instead, post a username and password and in return get JSON (error message not authenticated, or some user profile data) but it doesn't look like TW3HttpRequest object has a put method however, there is a Open method. Can something like this be done? fHTTP.Open('POST','http://mywebsite.com/login.php'); if so, how do I pass the parameters UserId and Password?