Skip to content

chore: Documentation cleanup, links to developer hub #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
## Overview

Official client side SDK by PayMaya Payment Gateway. For assistance you may reach us through paymayadevs@voyager.ph
Official JavaScript client-side SDK by Maya Philippines for [online payment solutions](https://developers.maya.ph/docs/online-payments).
For assistance, please check our [developer support page](https://developers.maya.ph/docs/support).

## Supported Use Cases

* [Checkout](https://developers.maya.ph/docs/maya-checkout)
* [Maya Vault](https://developers.maya.ph/docs/maya-vault)
* One-time payment
* Capturing tokenized card information via a customizable credit card form
* [Pay with Maya](https://developers.maya.ph/docs/pay-with-maya)
* Create a link to a Maya Wallet

## Install

Expand Down Expand Up @@ -221,6 +231,23 @@ Returns `Promise<void>`
| requestReferenceNumber | string | | Request reference number |
| metadata | object | | Additional information regarding payment |

---

#### `createCreditCardForm(targetHtmlElement, options)`
This method creates a credit card form in selected html element, by embedding a safe iframe instance in it - allowing the user to fill his credit card information in a safe manner.

Returns `void`

`createdCreditCardForm` properties:

| Parameter | Type | Required | Description |
|-----------------------|--------|----------|--------------------------------------------------------|
| targetHtmlElement | HTMLElement | Yes | a target html element in which form will be embedded |
| options | object | No | options object containing styling schema |
| options.buttonText | string | No | label text for a button inside the form |
| options.buttonColor | string | No | button color (example: '#000') |
| options.buttonTextColor | string | No | button text color (example: '#000') |
| options.showLogo | boolean | No | boolean whether to show PayMaya logo or not |

---

Expand Down Expand Up @@ -248,24 +275,6 @@ sdk
|-----------------------|--------|----------|--------------------------------------------------------|
| paymentTokenId | string | | a string that will be passed as argument to merchant's callback function |

---

#### `createCreditCardForm(targetHtmlElement, options)`
This method creates a credit card form in selected html element, by embedding a safe iframe instance in it - allowing the user to fill his credit card information in a safe manner.

Returns `void`

`createdCreditCardForm` properties:

| Parameter | Type | Required | Description |
|-----------------------|--------|----------|--------------------------------------------------------|
| targetHtmlElement | HTMLElement | Yes | a target html element in which form will be embedded |
| options | object | No | options object containing styling schema |
| options.buttonText | string | No | label text for a button inside the form |
| options.buttonColor | string | No | button color (example: '#000') |
| options.buttonTextColor | string | No | button text color (example: '#000') |
| options.showLogo | boolean | No | boolean whether to show PayMaya logo or not |

## Examples

A sample React.JS project is available under [/example](https://github.com/PayMaya/PayMaya-JS-SDK-v2/tree/master/example) in the repo.
Expand All @@ -277,4 +286,4 @@ npm ci
cd example
npm ci
npm start
```
```