Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
Garmentoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Angel FS
Garmentoo
Commits
d89a68d3
You need to sign in or sign up before continuing.
Commit
d89a68d3
authored
Feb 08, 2023
by
Fahad Sparrow
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master'
parents
50ef3335
61e806bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
Garmentoo/Controller/Modules/Payments/PaymentListVC.swift
+14
-7
Garmentoo/Global/Services/RestApiManager.swift
+1
-1
No files found.
Garmentoo/Controller/Modules/Payments/PaymentListVC.swift
View file @
d89a68d3
...
@@ -17,6 +17,8 @@ class PaymentListVC: UIViewController {
...
@@ -17,6 +17,8 @@ class PaymentListVC: UIViewController {
var
orderCreatedVM
=
OrderCreateVM
()
var
orderCreatedVM
=
OrderCreateVM
()
var
paymentList
=
[
Payment_list
]()
var
paymentList
=
[
Payment_list
]()
var
paymentId
:
Int
?
var
paymentId
:
Int
?
var
amount
:
Int
?
var
razorpay
:
RazorpayCheckout
!
var
razorpay
:
RazorpayCheckout
!
...
@@ -114,19 +116,20 @@ extension PaymentListVC{
...
@@ -114,19 +116,20 @@ extension PaymentListVC{
if
orderCreateData
?
.
status
==
true
if
orderCreateData
?
.
status
==
true
{
{
let
orderId
=
orderCreateData
?
.
order_d
let
orderId
=
orderCreateData
?
.
order_d
let
options
:
[
String
:
Any
]
=
[
let
options
:
[
String
:
Any
]
=
[
"amount"
:
"100"
,
//This is in currency subunits. 100 = 100 paise= INR 1.
"amount"
:
"100"
,
//This is in currency subunits. 100 = 100 paise= INR 1.
"currency"
:
"INR"
,
//We support more that 92 international currencies.
"currency"
:
"INR"
,
//We support more that 92 international currencies.
"description"
:
"
purchase description
"
,
"description"
:
"
Reference No. #123456
"
,
"order_id"
:
orderId
,
"order_id"
:
orderId
,
"image"
:
"https://
url-to-image
.jpg"
,
"image"
:
"https://
s3.amazonaws.com/rzp-mobile/images/rzp
.jpg"
,
"name"
:
"
business or product name
"
,
"name"
:
"
Garmentoo
"
,
"prefill"
:
[
"prefill"
:
[
"contact"
:
"9
797979797
"
,
"contact"
:
"9
447139231
"
,
"email"
:
"
foo@bar
.com"
"email"
:
"
neethumjose40@gmail
.com"
],
],
"theme"
:
[
"theme"
:
[
"color"
:
"#
F37254
"
"color"
:
"#
3399cc
"
]
]
]
]
razorpay
.
open
(
options
)
razorpay
.
open
(
options
)
...
@@ -164,11 +167,15 @@ extension PaymentListVC{
...
@@ -164,11 +167,15 @@ extension PaymentListVC{
extension
PaymentListVC
:
RazorpayPaymentCompletionProtocol
{
extension
PaymentListVC
:
RazorpayPaymentCompletionProtocol
{
func
onPaymentError
(
_
code
:
Int32
,
description
str
:
String
)
{
func
onPaymentError
(
_
code
:
Int32
,
description
str
:
String
)
{
print
(
"payment failed razor pay"
)
}
}
func
onPaymentSuccess
(
_
payment_id
:
String
)
{
func
onPaymentSuccess
(
_
payment_id
:
String
)
{
let
sb
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
nil
)
let
nextVc
=
sb
.
instantiateViewController
(
withIdentifier
:
"OrderSuccessVC"
)
as!
OrderSuccessVC
nextVc
.
hidesBottomBarWhenPushed
=
true
self
.
navigationController
?
.
pushViewController
(
nextVc
,
animated
:
true
)
}
}
...
...
Garmentoo/Global/Services/RestApiManager.swift
View file @
d89a68d3
...
@@ -13,5 +13,5 @@ typealias ServiceResponse = (JSON?, Error?) -> Void
...
@@ -13,5 +13,5 @@ typealias ServiceResponse = (JSON?, Error?) -> Void
class
RestApiManager
:
NSObject
{
class
RestApiManager
:
NSObject
{
static
let
sharedInstance
=
RestApiManager
()
static
let
sharedInstance
=
RestApiManager
()
let
baseURL
=
"http
://garmanto.svpstaging.com
"
let
baseURL
=
"http
s://garmentoo.svpstaging.com/
"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment