Skip to content

Complete Mandate added to sample codes of unified checkout #81

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from CyberSource import *
from CyberSource.rest import ApiException
from CyberSource.models import Upv1capturecontextsCaptureMandate, Upv1capturecontextsOrderInformationAmountDetails, Upv1capturecontextsOrderInformation, GenerateUnifiedCheckoutCaptureContextRequest
from CyberSource.models import Upv1capturecontextsCaptureMandate, Upv1capturecontextsOrderInformationAmountDetails, Upv1capturecontextsOrderInformation, GenerateUnifiedCheckoutCaptureContextRequest, Upv1capturecontextsCompleteMandate
from pathlib import Path
import os
import json
Expand Down Expand Up @@ -74,6 +74,11 @@ def generate_unified_checkout_capture_context():
orderInformation = Upv1capturecontextsOrderInformation(
amount_details = orderInformationAmountDetails.__dict__
)

completemandate = Upv1capturecontextsCompleteMandate(
type= "CAPTURE",
decision_manager = False
)

requestObj = GenerateUnifiedCheckoutCaptureContextRequest(
client_version = clientVersion,
Expand All @@ -83,7 +88,8 @@ def generate_unified_checkout_capture_context():
country = country,
locale = locale,
capture_mandate = captureMandate.__dict__,
order_information = orderInformation.__dict__
order_information = orderInformation.__dict__,
complete_mandate = completemandate.__dict__
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ def generate_unified_checkout_capture_context():
bill_to = orderInformationBillTo.__dict__,
ship_to = orderInformationShipTo.__dict__
)

completemandate = Upv1capturecontextsCompleteMandate(
type= "CAPTURE",
decision_manager = False
)

requestObj = GenerateUnifiedCheckoutCaptureContextRequest(
client_version = clientVersion,
Expand All @@ -181,7 +186,9 @@ def generate_unified_checkout_capture_context():
country = country,
locale = locale,
capture_mandate = captureMandate.__dict__,
order_information = orderInformation.__dict__
order_information = orderInformation.__dict__,
complete_mandate = completemandate.__dict__

)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def del_none(d):

def generate_unified_checkout_capture_context():

clientVersion = "0.23"
clientVersion = "0.26"

targetOrigins = []
targetOrigins.append("https://yourCheckoutPage.com")
Expand Down Expand Up @@ -77,6 +77,11 @@ def generate_unified_checkout_capture_context():
orderInformation = Upv1capturecontextsOrderInformation(
amount_details = orderInformationAmountDetails.__dict__
)

completemandate = Upv1capturecontextsCompleteMandate(
type= "CAPTURE",
decision_manager = False
)

requestObj = GenerateUnifiedCheckoutCaptureContextRequest(
client_version = clientVersion,
Expand All @@ -86,7 +91,9 @@ def generate_unified_checkout_capture_context():
country = country,
locale = locale,
capture_mandate = captureMandate.__dict__,
order_information = orderInformation.__dict__
order_information = orderInformation.__dict__,
complete_mandate = completemandate.__dict__

)


Expand Down