Skip to content

Latest commit

 

History

History
80 lines (39 loc) · 8.64 KB

File metadata and controls

80 lines (39 loc) · 8.64 KB

//sdk/com.swedbankpay.mobilesdk/PaymentOrderUrls/PaymentOrderUrls

PaymentOrderUrls

[androidJvm]
Content
@JvmOverloads()

fun PaymentOrderUrls(context: Context, backendUrl: String, callbackUrl: String? = null, termsOfServiceUrl: String? = null, identifier: String = UUID.randomUUID().toString())
More info

Creates a set of URLs suitable for use with a Merchant Backend server.

This constructor sets hostUrls to contain only backendUrl (this coincides with how MerchantBackendConfiguration sets the backend URL as ViewPaymentOrderInfo.webViewBaseUrl, completeUrl and cancelUrl to static paths relative to backendUrl. The paymentUrl will be constructed using the backendUrl, the path defined for the Android Intent Callback URL in the Merchant Backend specification, the identifier argument (by default a random UUID), and the application package name.

Example:

`hostUrls` `["https://example.com/"]`
`completeUrl``"https://example.com/complete"`
`cancelUrl` `"https://example.com/cancel"`
`paymentUrl` `"https://example.com/sdk-callback/android-intent?package=com.example.app&id=1234"`

Parameters

androidJvm

context

an application Context

backendUrl

the URL of your Merchant Backend

callbackUrl

the callbackUrl to use, if any

termsOfServiceUrl

the termsOfServiceUrl to use, if any

identifier

an identifier for this payment order. Should be unique within your app. Defaults to a random UUID.

[androidJvm]
Content
fun PaymentOrderUrls(context: Context, hostUrl: String, backendUrl: String, callbackUrl: String?, termsOfServiceUrl: String?, identifier: String = UUID.randomUUID().toString())
More info

Creates a set of URLs suitable for use with a Merchant Backend server.

This version of the constructor allows you to set the URL used for hostUrls separately. This is not usually needed.

Parameters

androidJvm

context

an application Context

hostUrl

the URL to place in hostUrls

backendUrl

the URL of your Merchant Backend

callbackUrl

the callbackUrl to use, if any

termsOfServiceUrl

the termsOfServiceUrl to use, if any

identifier

an identifier for this payment order. Should be unique within your app. Defaults to a random UUID.

[androidJvm]
Content
fun PaymentOrderUrls(hostUrls: List<String>, completeUrl: String, cancelUrl: String? = null, paymentUrl: String? = null, callbackUrl: String? = null, termsOfServiceUrl: String? = null)