Git Product home page Git Product logo

locomotion's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

locomotion's Issues

Can't create ride offer

Hi,

I'm trying to create a ride offer using api, but I'm always getting state as "offer-rejected" as you can see on image. Any ideas on how to fix it?

image

Make a ride request for testing

Hi Team,
I am testing the creation of a ride request, but the application requires real VISA card information. How can I configure a test card for this purpose? I tried adding the test publishable key, but I received an error message.
Thank you,

Screenshot 2024-07-16 at 11 35 26

Undefined symbol: _OBJC_CLASS_$_FIRApp

Hi,

I'm trying to run locomotion on iOS, but I got the following error message.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FIRApp", referenced from:
       in AppDelegate.o
  "_OBJC_CLASS_$_RCTBridge", referenced from:
       in AppDelegate.o
  "_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
       in AppDelegate.o
  "_RCTAppSetupDefaultRootView", referenced from:
      -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
  "_RCTAppSetupPrepareApp", referenced from:
      -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

On Android, I was bale to run it without problems, but still struggling with iOS version. Any ideas on how to fix it?

Steps to reproduce:

Macbook Air M2, 2022
React Native version : 0.68.5
Node version : v14.21.3
Xcode version : 15.4 (15F31d)
Destination: iPhone 15
SDK Simulator: iOS 17.5

Billing Integration

Billing Integration

Context:

In some cases Locomotion based apps need the ability to manage payments and charging transactions automatically.
As there is significant variability in how charging and billing flows are implemented, the approach is to define a specification that Locomotion app developers would be able to implement against.
This specification is called: External Billing Server API (EBS) and will be provided through a pull request on the public repo.

Requirements

  1. Once a user is created on locomotion an update will be sent to the billing service.
  2. Every ride that changes its state to one of the final states (completed, cancelled or failed) a request to EBS will be sent with the full ride details, price calculation and user id.
  3. Before the user makes a ride, Locomotion will check if the user is permitted to book from the billing standpoint.
  4. Balance, billing alerts and billing info will be visible to the user via a webview that will be accessible from the app.
  5. Each billing change will be sent to Locomotion server via API, EBS will be able to update charging state, document list (urls) and charge total.

API Security Note

A secret will be defined in both Locomotion and EBS, each request will contain a header - Authorization (JWT bearer token) that will include a secret containing the user id.

    {
        "userId": "UUID"
    }

EBS API Methods Suggested (Locomotion -> EBS):

User Created / Updated (Upsert)

[Post] /api/v1/users

Body:

    {
        "id": "UUID",
        "firstName": "STRING",
        "lastName": "STRING",
        "email": "STRING",
        "phoneNumber": "STRING",
        "createdAt": "STRING",
    }

Response:

    {
        "status": "OK",
    }

Check user ability to book a ride

[Get] /api/v1/users/:userId/current-balance

Response:

    {
        "balance": 100,
        "currency": "USD",
        "currencySymbol": "$",
        "bookingLimitation": "none",
        "charingType": "per-ride",
    }
  • bookingLimitation can be of

    • none
    • outstanding-balance
    • missing-payment-method
    • expired-billing-method
    • general-billing-issue
  • charingType can be of

    • per-ride
    • top-up

Ride reached a final state

[Patch] /api/v1/users/:userId/rides/:rideId

This method can be called more then one time.

Body:

    TBD

Response:

    {
        "status": "ok",
    }

User billing management page

[Patch] /api/v1/users/:userId/webview

This url should return an HTML to be showed to the user in app after clinking "Billing" from the main menu.

Locomotion API (EBS -> Locomotion)

Update billing status per ride

[Patch] /api/v1/users/:userId/rides/:rideId/billing

This method can be called more then one time, every call will replace the last data saved.

Body:

    {
        "status": "done",
        "priceCharged": 20,
        "currency": "USD",
        "currencySymbol": "$",
        "documents": [
            {
                "name": "Receipt",
                "url": "https://ebs.com/documents/uuid/?token"
            }
        ]
    }
  • status can be of
    • done
    • failed
    • processing
    • pending

Response:

    {
        "status": "ok",
    }

Unable to generate Price and ETAs

I get an error with status code 500 when fetching the /estimations API

Screenshot 2024-07-10 at 09 24 33

My cURL

curl --location 'https://api.autofleet.io/api/v1/estimations' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{authToken}}' \
--header 'content-type: application/json' \
--data '
{
  "queries": [
    {
      "rideType": "passenger"
    }
  ],
  "includePrice": true,
  "includeETA": true,
   "stopPoints": [
    {
      "type": "pickup",
      "lat": 43.642566,
      "lng": -79.387057
    },
    {
      "type": "dropoff",
      "lat": 45.507452,
      "lng": -73.587749
    }
  ],
  "demandSourceId": "{{demandSourceId}}",
  "businessModelId": "{{businessModelId}}"
}

Any ideas on how to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.