![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@getvolume/react-native
Advanced tools
React native components for Volume
npm install @getvolume/react-native
yarn add @getvolume/react-native
import { AppRegistry } from 'react-native';
AppRegistry.registerComponent('your_app', () => App);
To use Volume first include the VolumeProvider
, be sure to include your Merchant Id, apiKey and volumeEnvironment
volumeEnvironment is a String with either 'production'|'sanbox' or if you have a specific test environment url, use that. ie. https://test.getvolume.com/api/
Events can be subscribed to using the onEvent
provider property, provide a function and this will be called when events occur. The method is called with a single object detailing the event see /src/components/VolumeProvider/types.ts
VolumeEvent
.
import { HelloWorld, VolumeProvider } from '@getvolume/react-native';
const App = () => {
return (
<View>
<HelloWorld />
<VolumeProvider
merchantId="6323e6d5-cb2e-4b10-89ca-c7527439ce55"
apiKey="super-secret"
volumeEnvironment="https://test.getvolume.com/api/"
onEvent={eventHandlerFunction}
>
<CheckoutPage />
</VolumeProvider>
</View>
);
};
Then simply import the Volume
component to handle your payments.
Be sure to populate the paymentMeta
with the required fields for the payment to be successful. You can find out what this looks like here, the PaymentMeta
interface is what you need.
import { Volume } from '@getvolume/react-native';
const CheckoutPage = () => {
return (
<View>
<Title>Checkout!</Title>
<Volume
paymentMeta={{
amount: 100,
currency: 'GBP',
reference: 'chris-testing-1',
}}
/>
</View>
);
};
Thats it, easy right!
You can auto generate typescript definitions from the swagger json, dtsgenerator is a good tool for this.
Install it globally
npm i -G dtsgenerator
Run it against our api.
dtsgen --url <API_SWAGGER_URL> -o <OUTPUT_LOCATION
Example with the volumemvpkai-env, creating a file in the root directory here named volume-api.d.ts
.
dtsgen --url http://volumemvpkai-env.eba-sarhrj3y.eu-central-1.elasticbeanstalk.com/v3/api-docs -o volume-api.ts
You can then use this generated file to copy the interfaces you need/update any types we have referenced in the library.
See the contributing guide to learn how to contribute to the repository and the development workflow.
From the project root install with yarn
yarn
Run the example app to see and test changes
yarn example <ios|android>
You can then make changes in the src/components directory and they will be live updated in the example app.
See the full contributing doc for more detailed instructions.
We use the release-it
package to manage publishing to npm. Simply run yarn release
and follow the prompts to push a new version, remember to set a npm access token first for the @getvolume organisation.
MIT
FAQs
React Native
The npm package @getvolume/react-native receives a total of 32 weekly downloads. As such, @getvolume/react-native popularity was classified as not popular.
We found that @getvolume/react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.