File tree Expand file tree Collapse file tree 6 files changed +16
-16
lines changed
payment_experience/web_profile
subscription/billing_agreements Expand file tree Collapse file tree 6 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 37
37
print ("Payment[%s] created successfully" % (payment .id ))
38
38
# Redirect the user to given approval url
39
39
for link in payment .links :
40
- if link .method == "REDIRECT " :
41
- redirect_url = str (link .href )
42
- print ("Redirect for approval: %s" % (redirect_url ))
40
+ if link .rel == "approval_url " :
41
+ approval_url = str (link .href )
42
+ print ("Redirect for approval: %s" % (approval_url ))
43
43
else :
44
44
print ("Error while creating payment:" )
45
45
print (payment .error )
Original file line number Diff line number Diff line change 51
51
print ("Payment[%s] created successfully" % (payment .id ))
52
52
# Redirect the user to given approval url
53
53
for link in payment .links :
54
- if link .method == "REDIRECT " :
54
+ if link .rel == "approval_url " :
55
55
# Convert to str to avoid google appengine unicode issue
56
56
# https://github.com/paypal/rest-api-sdk-python/pull/58
57
- redirect_url = str (link .href )
58
- print ("Redirect for approval: %s" % (redirect_url ))
57
+ approval_url = str (link .href )
58
+ print ("Redirect for approval: %s" % (approval_url ))
59
59
else :
60
60
print ("Error while creating payment:" )
61
61
print (payment .error )
Original file line number Diff line number Diff line change 91
91
print ("Payment[%s] created successfully" % (payment .id ))
92
92
# Redirect the user to given approval url
93
93
for link in payment .links :
94
- if link .method == "REDIRECT " :
94
+ if link .rel == "approval_url " :
95
95
# Convert to str to avoid google appengine unicode issue
96
96
# https://github.com/paypal/rest-api-sdk-python/pull/58
97
- redirect_url = str (link .href )
98
- print ("Redirect for approval: %s" % (redirect_url ))
97
+ approval_url = str (link .href )
98
+ print ("Redirect for approval: %s" % (approval_url ))
99
99
else :
100
100
print ("Error while creating payment:" )
101
101
print (payment .error )
Original file line number Diff line number Diff line change 54
54
print ("Payment[%s] created successfully" % (payment .id ))
55
55
# Redirect the user to given approval url
56
56
for link in payment .links :
57
- if link .method == "REDIRECT " :
57
+ if link .rel == "approval_url " :
58
58
# Convert to str to avoid google appengine unicode issue
59
59
# https://github.com/paypal/rest-api-sdk-python/pull/58
60
- redirect_url = str (link .href )
61
- print ("Redirect for approval: %s" % (redirect_url ))
60
+ approval_url = str (link .href )
61
+ print ("Redirect for approval: %s" % (approval_url ))
62
62
else :
63
63
print ("Error while creating payment:" )
64
64
print (payment .error )
Original file line number Diff line number Diff line change 70
70
print ("Payment[%s] created successfully" % (payment .id ))
71
71
# Redirect the user to given approval url
72
72
for link in payment .links :
73
- if link .method == "REDIRECT " :
74
- redirect_url = str (link .href )
75
- print ("Redirect for approval: %s" % (redirect_url ))
73
+ if link .rel == "approval_url " :
74
+ approval_url = str (link .href )
75
+ print ("Redirect for approval: %s" % (approval_url ))
76
76
else :
77
77
print ("Error while creating payment:" )
78
78
print (payment .error )
Original file line number Diff line number Diff line change 26
26
})
27
27
28
28
# After creating the agreement, redirect user to the url provided in links array
29
- # entry with method field set to REDIRECT
29
+ # entry designated as "approval_url"
30
30
if billing_agreement .create ():
31
31
print ("Billing Agreement created successfully" )
32
32
for link in billing_agreement .links :
You can’t perform that action at this time.
0 commit comments