Skip to content

Instantly share code, notes, and snippets.

payment: function(data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '0.01',
currency: 'USD'
}
}]
});
}
payment: function(data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '30.11',
currency: 'USD',
details: {
subtotal: '30.00',
tax: '0.07',
shipping: '0.03',
onAuthorize: function(data, actions)
{
return actions.payment.execute().then(function()
{
// Show a confirmation message to the buyer
window.alert('Thank you for your purchase!');
});
}
import React, { createContext } from 'react';
import PropTypes from 'prop-types';
import { useSelector } from 'react-redux';
import { split, trimEnd, toNumber } from 'lodash';
import colors from 'res/colors';
import { selectors } from 'store/branding';
import { hexToHSL } from 'utils/helpers';
export const BrandingContext = createContext({});
import { createAppContainer } from 'react-navigation';
import { Provider as StoreProvider } from 'react-redux';
import React from 'react';
import store from 'store';
import Navigation from 'navigation';
import { BrandingProvider } from 'contexts';
const AppContainer = createAppContainer(Navigation);
import React, { useMemo, useContext } from 'react';
import { Image } from 'react-native';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { View } from 'react-native';
import { SvgWithCss } from 'react-native-svg';
import { BrandingContext } from 'contexts';
import { actions, selectors } from 'store/cards';
import styles from './styles';