Skip to content

Commit

Permalink
Merge pull request #14 from mediaopt/feature/34887-test-credit-card
Browse files Browse the repository at this point in the history
34887 - created story for credit card
  • Loading branch information
LiudmylaMasliuk authored Oct 5, 2023
2 parents 08847b7 + 4f5b574 commit 49fc579
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
20 changes: 20 additions & 0 deletions storybook/stories/HostedFields.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { HostedFields } from "../../src/components/HostedFields";
import { params, options, requestHeader } from "./constants";

export default {
title: "Components/HostedFields",
component: HostedFields,
argTypes: {},
};

export const Main = {
args: {
...params,
requestHeader,
options: {
...options,
components: "hosted-fields,buttons",
vault: false,
},
},
};
15 changes: 7 additions & 8 deletions storybook/stories/constants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ export const requestHeader = {
"Commercetools-Frontend-Extension-Version": "devmajidabbasi",
};

const baseUrl = "https://poc-mediaopt2.frontastic.rocks/frontastic/action/";

export const params = {
createPaymentUrl:
"https://poc-mediaopt2.frontastic.rocks/frontastic/action/payment/createPayment",
getSettingsUrl:
"https://poc-mediaopt2.frontastic.rocks/frontastic/action/settings/getPayPalSettings",
createOrderUrl:
"https://poc-mediaopt2.frontastic.rocks/frontastic/action/payment/createPayPalOrder",
onApproveUrl:
"https://poc-mediaopt2.frontastic.rocks/frontastic/action/payment/capturePayPalOrder",
createPaymentUrl: `${baseUrl}payment/createPayment`,
getSettingsUrl: `${baseUrl}settings/getPayPalSettings`,
createOrderUrl: `${baseUrl}payment/createPayPalOrder`,
getClientTokenUrl: `${baseUrl}payment/getClientToken`,
onApproveUrl: `${baseUrl}payment/capturePayPalOrder`,

shippingMethodId: "da416140-39bf-4677-8882-8b6cab23d981",
cartInformation: cartInformation,
Expand Down

0 comments on commit 49fc579

Please sign in to comment.