Skip to content

Commit 212ac91

Browse files
committed
Rename partnerUrl to apiUrl for paybis ramp plugin
1 parent 4f7ab91 commit 212ac91

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/plugins/ramps/paybis/paybisRampPlugin.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ interface PaybisPairs {
381381

382382
interface PaybisPluginState {
383383
apiKey: string
384-
partnerUrl: string
384+
apiUrl: string
385385
privateKeyB64: string
386386
partnerUserId: string
387387
}
@@ -473,7 +473,7 @@ export const paybisRampPlugin: RampPluginFactory = (
473473

474474
const initializeBuyPairs = async (): Promise<void> => {
475475
if (state == null) throw new Error('Plugin not initialized')
476-
const { apiKey, partnerUrl: url } = state
476+
const { apiKey, apiUrl: url } = state
477477

478478
if (paybisPairs.buy == null) {
479479
const response = await paybisFetch({
@@ -534,7 +534,7 @@ export const paybisRampPlugin: RampPluginFactory = (
534534

535535
const initializeSellPairs = async (): Promise<void> => {
536536
if (state == null) throw new Error('Plugin not initialized')
537-
const { apiKey, partnerUrl: url } = state
537+
const { apiKey, apiUrl: url } = state
538538

539539
if (paybisPairs.sell == null) {
540540
const response = await paybisFetch({
@@ -582,7 +582,7 @@ export const paybisRampPlugin: RampPluginFactory = (
582582

583583
const ensureStateInitialized = async (): Promise<void> => {
584584
if (state == null) {
585-
const { apiKey, partnerUrl, privateKeyB64 } = initOptions
585+
const { apiKey, apiUrl, privateKeyB64 } = initOptions
586586

587587
let partnerUserId: string
588588
if (pluginConfig.store != null) {
@@ -599,7 +599,7 @@ export const paybisRampPlugin: RampPluginFactory = (
599599

600600
state = {
601601
apiKey,
602-
partnerUrl,
602+
apiUrl,
603603
privateKeyB64,
604604
partnerUserId
605605
}
@@ -754,7 +754,7 @@ export const paybisRampPlugin: RampPluginFactory = (
754754
try {
755755
const response = await paybisFetch({
756756
method: 'GET',
757-
url: state.partnerUrl,
757+
url: state.apiUrl,
758758
path: `v2/public/user/${state.partnerUserId}/status`,
759759
apiKey: state.apiKey
760760
})
@@ -875,7 +875,7 @@ export const paybisRampPlugin: RampPluginFactory = (
875875

876876
const response = await paybisFetch({
877877
method: 'POST',
878-
url: state.partnerUrl,
878+
url: state.apiUrl,
879879
path: 'v2/public/quote',
880880
apiKey: state.apiKey,
881881
bodyParams,
@@ -1005,7 +1005,7 @@ export const paybisRampPlugin: RampPluginFactory = (
10051005
const privateKey = atob(state!.privateKeyB64)
10061006
const promise = paybisFetch({
10071007
method: 'POST',
1008-
url: state!.partnerUrl,
1008+
url: state!.apiUrl,
10091009
path: 'v2/public/request',
10101010
apiKey: state!.apiKey,
10111011
bodyParams,
@@ -1137,7 +1137,7 @@ export const paybisRampPlugin: RampPluginFactory = (
11371137
try {
11381138
const payDetails = await paybisFetch({
11391139
method: 'GET',
1140-
url: state!.partnerUrl,
1140+
url: state!.apiUrl,
11411141
path: `v2/request/${requestId}/payment-details`,
11421142
apiKey: state!.apiKey,
11431143
promoCode

src/plugins/ramps/paybis/paybisRampTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { asObject, asOptional, asString } from 'cleaners'
22

33
export const asInitOptions = asObject({
4-
partnerUrl: asOptional(asString, 'https://widget-api.paybis.com'),
54
apiKey: asString,
5+
apiUrl: asOptional(asString, 'https://widget-api.paybis.com'),
66
privateKeyB64: asString,
77
widgetUrl: asOptional(asString, 'https://widget.paybis.com'),
88
widgetTestnetUrl: asOptional(asString, 'https://widget.sandbox.paybis.com')

0 commit comments

Comments
 (0)