{"id":18825397,"url":"https://github.com/outsystems/ospaymentslib-ios","last_synced_at":"2026-01-21T00:30:16.086Z","repository":{"id":63371627,"uuid":"507925293","full_name":"OutSystems/OSPaymentsLib-iOS","owner":"OutSystems","description":"OutSystems-owned repository for the Payments plugin's iOS library.","archived":false,"fork":false,"pushed_at":"2024-04-11T17:05:45.000Z","size":1096,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-04-14T10:11:29.098Z","etag":null,"topics":["engineering","odc","snyk-mobile","ssdlc-rules"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutSystems.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T13:41:26.000Z","updated_at":"2024-03-05T10:14:11.000Z","dependencies_parsed_at":"2024-04-09T12:43:40.783Z","dependency_job_id":"866d8ebc-e4fb-40f2-bf30-d0b781d36f5d","html_url":"https://github.com/OutSystems/OSPaymentsLib-iOS","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"8717712c9bd0a7333aeff147311c99754fd872f3"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSPaymentsLib-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSPaymentsLib-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSPaymentsLib-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutSystems%2FOSPaymentsLib-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutSystems","download_url":"https://codeload.github.com/OutSystems/OSPaymentsLib-iOS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763667,"owners_count":19692800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["engineering","odc","snyk-mobile","ssdlc-rules"],"created_at":"2024-11-08T00:59:19.397Z","updated_at":"2026-01-21T00:30:16.034Z","avatar_url":"https://github.com/OutSystems.png","language":"Swift","readme":"# OSPaymentsPluginLib-iOS\n\nThe `OSPaymentsPluginLib-iOS` is a library build using `Swift` that lets you set a payment experience using Apple Pay. It allows to set the payment's details, such as the merchant’s information, payment amount and currency, as well as shipping and billing address. This information can then used to process a payment within an app.\n\nThe `OSPMTActionDelegate` protocol, along with the class that implements it - `OSPMTPayments` - allows this interaction, providing the following operations:\n- Setup Payment Configuration\n- Check if Device is Ready for Payment\n- Set Details and Trigger Payment\n\nEach is detailed on following sections.\n\n## Index\n\n- [Motivation](#motivation)\n- [Usage](#usage)\n- [Methods](#methods)\n    - [Setup Payment Configuration](#setup-payment-configuration)\n    - [Check if Device is Ready for Payment](#check-if-device-is-ready-for-payment)\n    - [Set Details and Trigger Payment](#set-details-and-trigger-payment)\n\n## Motivation\n\nThis library is to be used by the [Payments Plugin](https://github.com/OutSystems/cordova-outsystems-payments). The repository contains a `podspec` file that is published and available on the `CocoaPods`' repository, and should be imported on the Cordova bridge as a `pod`.\n\n## Usage\n\n1. Include the `OSPaymentsPluginLib` pod in the Cordova Bridge. o accomplish this, the following needs to be inserted into the `plugin.xml` file. The `spec` field should be changed to the version the developer desires to use.\n\n```xml\n\u003cplatform\u003e\n\t...\n\t\u003cpodspec\u003e\n        \u003cconfig\u003e\n            \u003csource url=\"https://cdn.cocoapods.org/\"/\u003e\n        \u003c/config\u003e\n        \u003cpods use-frameworks=\"true\"\u003e\n        \t...\n            \u003cpod name=\"OSPaymentsPluginLib\" spec=\"{VERSION TO USE}\" /\u003e\n            ...\n        \u003c/pods\u003e\n    \u003c/podspec\u003e\n\t...\n\u003c/platform\u003e\n```\n\n2. Go to [Apple Developer Portal](https://developer.apple.com/) and configure the Provisioning Profile with the `Apple Pay Payment Processing` and `In-App Purchase` capabilities enabled.\n\n## Methods\n\nThe library provides the following methods to interact with:\n\n### Setup Payment Configuration\n\n```swift\nfunc setupConfiguration()\n```\n\nSets up the payment configuration.\n\nThe method's success is returned through a `OSPMTCallbackDelegate` call. Success operations returns an object of the structure type `OSPMTConfigurationModel`, encoded in a UTF-8 string. An `OSPMTError` error is returned in case of error.\n\n### Check if Device is Ready for Payment\n\n```swift\nfunc checkWalletSetup()\n```\n\nVerifies the device is ready to process a payment, considering the configuration provided before.\n\nThe method's success is returned through a `OSPMTCallbackDelegate` call. Success operations returns an empty string or a `OSPMTError` error otherwise.\n\n### Set Details and Trigger Payment\n\n```swift\nfunc set(_ details: String, and: accessToken: String?)\n```\n\nSets payment details and triggers the request proccess. The method contains the following parameter:\n- `details`: Payment details model serialized into a text field. This model can be checked in the `OSPMTDetailsModel` structure.\n- `accessToken`: Authorisation token related with a full payment type. Can be empty, which should be the case for custom payments.\n\nThe method's success is returned through a `OSPMTCallbackDelegate` call. Success operations returns an object of the structure type `OSPMTScopeModel`, encoded in a UTF-8 string. An `OSPMTError` error is returned in case of error.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fospaymentslib-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutsystems%2Fospaymentslib-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutsystems%2Fospaymentslib-ios/lists"}