Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

unable to change the amount charged from iOS app #91

Open
@aidan305

Description

@aidan305

I think the amount charged is hardcoded to 10.99 usd. I want to change the amount for the payment intent created I tried the below in my iOS app but it didn't work. any suggestions?

` func createPaymentIntent(completion: @escaping STPJSONResponseCompletionBlock) {
var url = URL(string: backendURL)!
url.appendPathComponent("create_payment_intent")

    AF.request(url, method: .post, parameters: ["amount": 4000 , "currency" : "USD"])
               .validate(statusCode: 200..<300)
               .responseJSON { (response) in
                switch (response.result){
                case .failure(let error):
                    completion(nil, error)
                case .success(let jsonResponse):
                    completion(jsonResponse as? [String : Any], nil)
                }
           }
}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions