@@ -122,7 +122,8 @@ def _determine_hpp_url(self, platform, action):
122122 result = '/' .join ([base_uri , service ])
123123 return result
124124
125- def _determine_checkout_url (self , platform , service , action ):
125+ def _determine_checkout_url (self , platform , service , action ,
126+ live_endpoint_prefix = None ):
126127 """This returns the Adyen API endpoint based on the provided platform,
127128 service and action.
128129
@@ -133,14 +134,18 @@ def _determine_checkout_url(self, platform, service, action):
133134 """
134135 if action == "paymentDetails" :
135136 action = "payment/details"
136- if action == "paymentResult " :
137+ if action == "paymentsResult " :
137138 action = "payment/result"
138139 if action == "originKey" :
139140 action = "v1/originKeys"
140141
141142 base_uri = settings .BASE_CHECKOUT_URL .format (platform )
142- api_version = settings .CHECKOUT_API_VERSION
143143
144+ if live_endpoint_prefix is not None :
145+ base_uri = settings .ENDPOINT_PROTOCOL + live_endpoint_prefix \
146+ + settings .CHECKOUT_URL_LIVE_SUFFIX
147+
148+ api_version = settings .CHECKOUT_API_VERSION
144149 return '/' .join ([base_uri , api_version , action ])
145150
146151 def _review_payout_username (self , ** kwargs ):
0 commit comments