Latest 1.4.17
Homepage https://github.com/dotpay/Mobile-SDK-iOS/
License Academic Free License (“AFL”) v. 3.0 Academic Free License (“AFL”) v. 3.0
This Academic Free License (the “License”) applies to any original work of authorship (the “Original Work”) whose owner (the “Licensor”) has placed the following licensing notice adjacent to the copyright notice for the Original Work:
Licensed under the Academic Free License version 3.0
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
a) to reproduce the Original Work in copies, either alone or as part of a collective work;
b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works (“Derivative Works”) based upon the Original Work;
c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
3) Grant of Source Code License. The term “Source Code” means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
5) External Deployment. The term “External Deployment” means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an “Attribution Notice.” You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an “AS IS” BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys’ fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
14) Definition of “You” in This License. “You” throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the “Modified License”) and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the “Academic Free License” or “AFL” and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice “Licensed under ” or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
Platforms ios 9.1, requires ARC
Dependencies VisaCheckoutSDK
Authors

SDK logo

desrciption for the new version 1.2.0 being prepared …

Technical manual for developers PDF – polish

Latest version: (https://github.com/dotpay/Mobile-SDK-iOS/releases/latest)


SDK (iOS) Version 1.0.3

SDK screenshots

Latest stable Version

https://github.com/dotpay/Mobile-SDK-iOS/releases/latest

Introduction

Set of software development tools (SDK library) that allows to integrate merchant’s mobile application with Dotpay payment system.
Thanks to devolving as many steps from our web application as possible to mobile application, the payment process is more convenient for a user and a developer obtains more control over it.
There is an option to modify vizualization style of SDK (colors, fonts) to have best integration possible with merchant’s mobile application.
The SDK library was created in language Objective-C. It supports iOS version 8.0 and higher.

How to get started

install via CocoaPods

pod 'DotPaySDK'

Classic

You have to add the SDK to a project and initialize it in a proper way to use it. Details of these steps were described in next chapters.
In order to make it easier to start with SDK, we deliver a test application, available in example sub-directory. Project settings

  • The Dotpay framework has to be added to a project. It is located in lib sub-directory (in the bookmark Build Phases please select section Embed Frameworks).
  • The JavaScriptCore framework has to be added to the project.
    The header file has to be imported to every place that uses SDK:
#import <DotPaySDK/DotPaySDK.h> 

System selection

The SDK library may communicate both with Dotpay production and test environment. SDK library works in production version by default.
In order to select the test system, you need to follow the instruction:

    [DotPay sharedInstance].debugMode = YES;

In order to select the production system, you need to follow the instruction:

    [DotPay sharedInstance].debugMode = NO;

Payment process

The payment process consists of displaying controller DPDotPayViewController and awaiting calling out a delegate method that returns control.
The SDK library will guide the client through the process of selecting payment channel, passing on/verification client’s data, selecting extra options, accepting proper terms of use and finalizing the payment process.
In the event of paying for real goods, payment status received from SDK is just informational, a right order status will be delivered in the backend system according to Dotpay technical manual.
In next chapters there are described steps required to use payment controllers and extra options that enable adjusting payment process to own needs.

Preparing return delegate

Preparing payment process starts from preparing delegate
DPDotPayViewControllerDelegate:

-(void) dotpayViewController: (DPDotPayViewController*)viewController didFinishPaymentWithSummary: (DPPaymentSummary *)paymentSummary;
-(void) dotpayViewController: (DPDotPayViewController*)viewController didFailToFinishPaymentWithError: (NSError *)error

Initializing payment process

A payment description has to be prepared to start the payment process. An instance of a class DPPaymentInfo has to be created and filled out with data described in the table below:

merchantID Type: NSString Merchant’s ID number in Dotpay system
amount Type: NSDecimalNumber Order amount
textDescription Type: NSString Order description
currency Type: DPCurrency Default value: „PLN” It describes currency of parameter amount. In the chapter Available currencies we,described a way how to download available currency list
senderInformation Type: NSDictionary Default value: nil Additional information on client, e.g. name, surname, email…,Keys:,“firstname”; “lastname”; “email”; “phone”; “street"; “street_n1” – building number; "street_n2" – flat number; "postcode"; "city"; "country" (3 letters ISO3166).,These values are not mandatory. We recommend to pass on at least name, surname and email. The payment form should be filled out with that type of data. SDK will ask a client for missing data.,Specific explanation of these fields is described in Dotpay technical manual.
additionalInformation Type: NSDictionary Default value: nil Extra parameters handed over in a payment process in accordance with additional technical manuals.
Control Type: NSString Default value: nil The parameter that defines a payment, handed over in payment confirmation, which is sent to a Shop. This parameter is required to match a payment status to an appropriate order in a Shop.,More information you will find in the Dotpay technical manual. If not set, it’s generated by SDK. ATTENTION,To have properly working payment history, this parameter should be unique for every order.
urlc Type: NSString Default value: nil URL address used for receiving payment information (order completed or rejected).More information you will find in the Dotpay technical manual.

Example:

DPPaymentInfo *info = [[DPPaymentInfo alloc] init];
info.currency = [DPCurrency currencyWithCode:@"PLN"];
info.amount = [NSDecimalNumber decimalNumberWithString:@"100.0"];
info.merchantID = @"10000";
info.textDescription = @"Some description";
info.senderInformation = @{@"firstname": @"Jan”, @"surname": @"Kowalski”,
@"email": @"[email protected]"};
info.additionalInformation = @{@"id1": @"12345”, @"amount1": @"40”, @"id1": @"67890”, @"amount2": @"60"};

The next step is downloading channels list by means of one of the following methods, passing on transaction details:

  • downloads all channels
[[DotPay sharedInstance] getChannelListForPaymentInfo:info withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]
  • downloads channels that are currently online/offline
[[DotPay sharedInstance] getChannelListForPaymentInfo:info online:online withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]
  • downloads channels according to ID
[[DotPay sharedInstance] getChannelListForPaymentInfo:info withIds:ids withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]
  • downloads channels of given types
[[DotPay sharedInstance] getChannelListForPaymentInfo:info group:group withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]

At the end a controller in the main thread is presented asynchronous and the following operations are executed:

  • Initializing payment controller with channels list and payment details
  • Optional last selected channel shutdown (this option is turned on by default)
  • Set a return delegate
  • Display a controller

Example:

__weak typeOf(self) weakSelf = self;
dispatch_async(dispatch_get_main_queue(), ^{
    DPDotPayViewController *dotPayViewController =
    [[DPDotPayViewController alloc] initWithPaymentChannelList:channelList
    paymentDetails:paymentDetails];
    dotPayViewController.useLastChannelSelection = NO;
    dotPayViewController.paymentControllerDelegate = weakSelf;
    [weakSelf presentViewController:dotPayViewController animated:YES
    completion:NULL];
}); }];

Finalizing payment process

A correctly finalized payment process is signalized by a proper delegate method.
In the event of successful payment process, the method dotpayViewController:didFinishPaymentWithStatus is called out. The argument of this method is the class DPPaymentSummary object, that holds payment details.

If the payment process finishes with an error, the dotpayViewController:didFailToFinishPaymentWithError: method will be called out with argument, which is an error description.

ATTENTION!

A finalized payment process with a success doesn’t mean the payment was processed, but it means the payment had no errors. A payment result will be returned in an appropriate event parameter.
Examples of event handlers:

-(void) dotpayViewController: (DPDotPayViewController *)viewController didFinishPaymentWithSummary: (DPPaymentSummary *)paymentSummary {
    if([paymentSummary.type isEqualToString: kDPPaymentSummaryStatusCompleted]) {
        // payment successful
    } else if ([paymentSummary.type isEqualToString: kDPPaymentSummaryStatusRejected])
    {
        // payment rejected
    } else {
        payment is being processed
    }
}
-(void) dotpayViewController: (DPDotPayViewController *)viewController didFailToFinishPaymentWithError: (NSError *)error {
    //payment error
}

Available currencies

A list of currencies supported by Dotpay can be downloaded by the following method of PaymentManager:

[[DotPay sharedInstance] getCurrencyListWithCompletion:^(NSArray *currencyList, NSError *error){
}];

Changing presentation style

In order to change presentation style of controls element in a payment process the UIAppearance has to be used.
Using the appearanceWhenContainedIn system control method, presentation changes may be limited only to specific payment controllers:

  • DPPaymentChannelsViewController – channel selection controller
  • DPPaymentFormViewController – Payment form controller. This controller is not available for developer,so that to use it the NSClassFromString is required NSClassFromString(@”DPPaymentFormViewController”)
  • DPPaymentSummaryViewController – confirmation page controller

Personal channel selection control

SDK library enables replacing default channel selection control, to adjust needs of Merchant’s shop. The following steps are required to use this possibility:

  1. Prepare an object of the DPPaymentDetails class and fill it out with data (in accordance with aforementioned chapter Payment initialization)
  2. Download channels list (channels, in which we are not interested may be deleted) along with downloading payment details:
[[DotPay sharedInstance] getChannelListForPaymentInfo:info withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }
  1. At the end a controller in the main thread is presented asynchronous:
    a. Initializing personal payment controller with channels list and payment details
    b. Initializing the DPDotPayViewController payment controller with indicating personal channel payment controller
    c. Setting a return delegate
    d. Displaying Dotpay payment controller

Example:

dispatch_async(dispatch_get_main_queue(), ^{
    MyCustomChannelViewController *myChannelViewController = [[MyCustomChannelViewController alloc] initWithPaymentChannelList:channelList ];
    DPDotPayViewController *paymentViewController = [[DPDotPayViewController alloc] initWithPaymentChannelSelectionController: myChannelViewController paymentDetails:paymentDetails];
    paymentViewController.paymentControllerDelegate = self;
    [self presentViewController:paymentViewController animated:YES completion:NULL];
});

Special channels support

Extra functions related to special payment channels are described.

Credit card payment – 1Click

1Click functionality enables quick payment process with a saved credit card. Basic credit card data are saved in Dotpay system, while CVV is saved in SDK library (after proper encoding).
This functionality (if available in Merchant’s shop) is turned on by default in SDK. A client’s consent is also required to use 1Click (while filling out the payment form).
In order to turn off 1Click, the following command is required:

[DPOneClickManager sharedInstance].enabled = NO;

In order to turn off only CVV saving, the following command is required:

[DPOneClickManager sharedInstance].cvvStoreEnabled = NO;

ATTENTION

After turning off aforementioned options, formerly saved credit card data is not removed. To remove that data, the following commands are required.
An additional Developer’s duty is to create an option to remove saved credit card data. To find out, if credit card data are saved, the following command is required:

[[DPOneClickManager sharedInstance] isDataAvailable];

The following method removes credit card data:

[[DPOneClickManager sharedInstance] clearData];

Executing this method removes credit card number from Dotpay system and data stored locally.
The option of removing only CVV number is also available. In order to check, if CVV is stored locally, the following method is required:

[[DPOneClickManager sharedInstance] isCVVDataAvailable];

In order to remove CVV number only, the following method is required:

[[DPOneClickManager sharedInstance] clearCVVData];

Transaction history and status

SDK library offers saving and displaying transaction history. The transaction history also displays related operations, e.g. subsequently made refunds and other additional operations.
The use of built-in control
In order to use built-in history control, the DPPaymentHistoryController controller has to be initialized and displayed:

DPPaymentHistoryController *historyController = [[DPPaymentHistoryController alloc] initWithPaymentHistory:nil];
[self presentViewController:historyController animated:YES completion:NULL];

Changing presentation style

A change of presentation way of controls elements in payment process is made with a use of the UIAppearance framework. Detailes are described in the chapter A change of presentation style.
A history controller, for which presentation change limitations may be applied to is DPPaymentHistoryController.

Example:

[[UIView appearanceWhenContainedIn: [DPPaymentHistoryController class], nil] setBackgroundColor:[UIColor redColor]];

Personal history control
SDK library offers creating personal history control by downloading only data from the library, to better match web shop specification
The downloading payment history data is available in the paymentHistory attribute of singleton DPPaymentHistory:

NSArray *paymentSummaries = [DPPaymentHistory sharedInstance].paymentHistory;

Additionally for transactions in personal history you can:

  1. Remove a single transaction
[[DPPaymentHistory sharedInstance] removePaymentSummary: paymentToRemove];
  1. Check current payment status for a record in the history and refresh displayed data:
    a. In personal view DPPaymentHistoryObserver observer methods are implemented, which refresh history view:
- (void)paymentHistory:(DPPaymentHistory *)paymentHistory didUpdatePaymentSummary:(DPPaymentSummary *)paymentSummary;
- (void)paymentHistory:(DPPaymentHistory *)paymentHistory didFailedToUpdatePaymentSummary:(DPPaymentSummary *)paymentSummary withError:(NSError *)error;

b. Register observer waiting for history changes

[[DPPaymentHistory sharedInstance] registerObserver: self]

c. Call out a method that updates payment status:

[[DPPaymentHistory sharedInstance] updatePaymentSummary: paymentToUpdate];

d. While releasing custom history controler, unregister history change observer

[[DPPaymentHistory sharedInstance] unRegisterObserver: self]

License

Academic Free License ("AFL") v. 3.0

Latest podspec

{
    "name": "DotPaySDK",
    "version": "1.4.17",
    "summary": "DotPay SDK",
    "description": "# DotPaySDKnn![SDK logo](logo.png)nnn## desrciption for the new version 1.2.0 being prepared ...nn### Technical manual for developers [PDF - polish](https://github.com/dotpay/Mobile-SDK-iOS/raw/master/dotpay_mobile_sdk_ios_1.2.0/doc/Dotpay_Mobile_SDK-iOS-Instrukcja_dla_developera_v1.2.0.pdf)nn### Latest version: (https://github.com/dotpay/Mobile-SDK-iOS/releases/latest)nn-----------------nnSDK (iOS) Version 1.0.3nn![SDK screenshots](screen.png)nn# Latest stable Versionnnhttps://github.com/dotpay/Mobile-SDK-iOS/releases/latestnn## IntroductionnSet of software development tools (SDK library) that allows to integrate merchantu2019s mobile application with Dotpay payment system.nThanks to devolving as many steps from our web application as possible to mobile application, the payment process is more convenient for a user and a developer obtains more control over it.nThere is an option to modify vizualization style of SDK (colors, fonts) to have best integration possible with merchantu2019s mobile application.nThe SDK library was created in language Objective-C. It supports iOS version 8.0 and higher.nn# How to get startednninstall via [CocoaPods](https://cocoapods.org)nn```objnpod 'DotPaySDK'n```nn### Classicn nYou have to add the SDK to a project and initialize it in a proper way to use it. Details of these steps were described in next chapters.nIn order to make it easier to start with SDK, we deliver a test application, available in example sub-directory. Project settingsnn- The Dotpay framework has to be added to a project. It is located in lib sub-directory (in the bookmark Build Phases please select section Embed Frameworks).n- The JavaScriptCore framework has to be added to the project.nThe header file has to be imported to every place that uses SDK:nn```objcn#import  n```nn### System selectionnThe SDK library may communicate both with Dotpay production and test environment. SDK library works in production version by default.nIn order to select the test system, you need to follow the instruction:nn```objcn    [DotPay sharedInstance].debugMode = YES;n```nnIn order to select the production system, you need to follow the instruction:nn```objcn    [DotPay sharedInstance].debugMode = NO;n```nn### Payment processnThe payment process consists of displaying controller `DPDotPayViewController` and awaiting calling out a delegate method that returns control.nThe SDK library will guide the client through the process of selecting payment channel, passing on/verification clientu2019s data, selecting extra options, accepting proper terms of use and finalizing the payment process.nIn the event of paying for real goods, payment status received from SDK is just informational, a right order status will be delivered in the backend system according to Dotpay technical manual.nIn next chapters there are described steps required to use payment controllers and extra options that enable adjusting payment process to own needs.nn### Preparing return delegatenPreparing payment process starts from preparing delegaten`DPDotPayViewControllerDelegate:`nn```objcn-(void) dotpayViewController: (DPDotPayViewController*)viewController didFinishPaymentWithSummary: (DPPaymentSummary *)paymentSummary;n-(void) dotpayViewController: (DPDotPayViewController*)viewController didFailToFinishPaymentWithError: (NSError *)errorn```nn### Initializing payment processnA payment description has to be prepared to start the payment process. An instance of a class DPPaymentInfo has to be created and filled out with data described in the table below:nn|                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|n| merchantID            | Type: `NSString` Merchant's ID number in Dotpay system                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |n| amount                | Type: `NSDecimalNumber` Order amount                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |n| textDescription       | Type: `NSString` Order description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |n| currency              | Type: `DPCurrency` Default value: u201ePLNu201d It describes currency of parameter amount. In the chapter Available currencies we,described a way how to download available currency list                                                                                                                                                                                                                                                                                                                                                                            |n| senderInformation     | Type: `NSDictionary` Default value: nil Additional information on client, e.g. name, surname, email...,Keys:,u201cfirstnameu201d; u201clastnameu201d; u201cemailu201d; u201cphoneu201d; u201cstreet"; u201cstreet_n1u201d u2013 building number; "street_n2" u2013 flat number; "postcode"; "city"; "country" (3 letters ISO3166).,These values are not mandatory. We recommend to pass on at least name, surname and email. The payment form should be filled out with that type of data. SDK will ask a client for missing data.,Specific explanation of these fields is described in Dotpay technical manual. |n| additionalInformation | Type: `NSDictionary` Default value: nil Extra parameters handed over in a payment process in accordance with additional technical manuals.                                                                                                                                                                                                                                                                                                                                                                                                                   |n| Control               | Type: `NSString` Default value: nil The parameter that defines a payment, handed over in payment confirmation, which is sent to a Shop. This parameter is required to match a payment status to an appropriate order in a Shop.,More information you will find in the Dotpay technical manual. If not set, itu2019s generated by SDK. ATTENTION,To have properly working payment history, this parameter should be unique for every order.                                                                                                                       |n| urlc                  | Type: `NSString` Default value: nil URL address used for receiving payment information (order completed or rejected).More information you will find in the Dotpay technical manual.                                                                                                                                                                                                                                                                                                                                                                          |nnnn# Example:nn```objcnDPPaymentInfo *info = [[DPPaymentInfo alloc] init];ninfo.currency = [DPCurrency currencyWithCode:@"PLN"];ninfo.amount = [NSDecimalNumber decimalNumberWithString:@"100.0"];ninfo.merchantID = @"10000";ninfo.textDescription = @"Some description";ninfo.senderInformation = @{@"firstname": @"Janu201d, @"surname": @"Kowalskiu201d,[email protected]"email": @"[email protected]"};ninfo.additionalInformation = @{@"id1": @"12345u201d, @"amount1": @"40u201d, @"id1": @"67890u201d, @"amount2": @"60"};n```nnThe next step is downloading channels list by means of one of the following methods, passing on transaction details:n- downloads all channelsnn```objcn[[DotPay sharedInstance] getChannelListForPaymentInfo:info withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]n```nn- downloads channels that are currently online/offlinenn```objcn[[DotPay sharedInstance] getChannelListForPaymentInfo:info online:online withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]n```nn- downloads channels according to IDnn```objcn[[DotPay sharedInstance] getChannelListForPaymentInfo:info withIds:ids withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]n```nn- downloads channels of given typesnn```objcn[[DotPay sharedInstance] getChannelListForPaymentInfo:info group:group withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }]n```nnAt the end a controller in the main thread is presented asynchronous and the following operations are executed:nn* Initializing payment controller with channels list and payment detailsn* Optional last selected channel shutdown (this option is turned on by default)n* Set a return delegaten* Display a controllernn## Example:nn```objcn__weak typeOf(self) weakSelf = self;ndispatch_async(dispatch_get_main_queue(), ^{n    DPDotPayViewController *dotPayViewController =n    [[DPDotPayViewController alloc] initWithPaymentChannelList:channelListn    paymentDetails:paymentDetails];n    dotPayViewController.useLastChannelSelection = NO;n    dotPayViewController.paymentControllerDelegate = weakSelf;n    [weakSelf presentViewController:dotPayViewController animated:YESn    completion:NULL];n}); }];n```nn## Finalizing payment processnnA correctly finalized payment process is signalized by a proper delegate method.nIn the event of successful payment process, the method `dotpayViewController:didFinishPaymentWithStatus` is called out. The argument of this method is the class `DPPaymentSummary` object, that holds payment details.nnIf the payment process finishes with an error, the `dotpayViewController:didFailToFinishPaymentWithError:` method will be called out with argument, which is an error description.nn# ATTENTION!nA finalized payment process with a success doesnu2019t mean the payment was processed, but it means the payment had no errors. A payment result will be returned in an appropriate event parameter.nExamples of event handlers:nn```objcn-(void) dotpayViewController: (DPDotPayViewController *)viewController didFinishPaymentWithSummary: (DPPaymentSummary *)paymentSummary {n    if([paymentSummary.type isEqualToString: kDPPaymentSummaryStatusCompleted]) {n        // payment successfuln    } else if ([paymentSummary.type isEqualToString: kDPPaymentSummaryStatusRejected])n    {n        // payment rejectedn    } else {n        payment is being processedn    }n}n-(void) dotpayViewController: (DPDotPayViewController *)viewController didFailToFinishPaymentWithError: (NSError *)error {n    //payment errorn}n```n    n## Available currenciesnA list of currencies supported by Dotpay can be downloaded by the following method of PaymentManager:nn```objcn[[DotPay sharedInstance] getCurrencyListWithCompletion:^(NSArray *currencyList, NSError *error){n}];n```nn### Changing presentation stylenIn order to change presentation style of controls element in a payment process the `UIAppearance` has to be used.nUsing the appearanceWhenContainedIn system control method, presentation changes may be limited only to specific payment controllers:n- `DPPaymentChannelsViewController` u2013 channel selection controllern- `DPPaymentFormViewController` u2013 Payment form controller. This controller is not available for developer,so that to use it the *NSClassFromString* is required `NSClassFromString(@u201dDPPaymentFormViewControlleru201d)`n- `DPPaymentSummaryViewController` u2013 confirmation page controllern  nn### Personal channel selection controlnSDK library enables replacing default channel selection control, to adjust needs of Merchantu2019s shop. The following steps are required to use this possibility:n1. Prepare an object of the DPPaymentDetails class and fill it out with data (in accordance with aforementioned chapter Payment initialization)n2. Download channels list (channels, in which we are not interested may be deleted) along with downloading payment details:nn```objcn[[DotPay sharedInstance] getChannelListForPaymentInfo:info withCompletion:^(NSArray *channelList, DPPaymentDetails *paymentDetails, NSError *error) { }n```nn3. At the end a controller in the main thread is presented asynchronous:na. Initializing personal payment controller with channels list and payment detailsnb. Initializing the DPDotPayViewController payment controller with indicating personal channel payment controllernc. Setting a return delegatend. Displaying Dotpay payment controllernn#### Example:nn```objcndispatch_async(dispatch_get_main_queue(), ^{n    MyCustomChannelViewController *myChannelViewController = [[MyCustomChannelViewController alloc] initWithPaymentChannelList:channelList ];n    DPDotPayViewController *paymentViewController = [[DPDotPayViewController alloc] initWithPaymentChannelSelectionController: myChannelViewController paymentDetails:paymentDetails];n    paymentViewController.paymentControllerDelegate = self;n    [self presentViewController:paymentViewController animated:YES completion:NULL];n});n```nn### Special channels supportnnExtra functions related to special payment channels are described.nn#### Credit card payment - 1Clickn1Click functionality enables quick payment process with a saved credit card. Basic credit card data are saved in Dotpay system, while CVV is saved in SDK library (after proper encoding).nThis functionality (if available in Merchantu2019s shop) is turned on by default in SDK. A clientu2019s consent is also required to use 1Click (while filling out the payment form).nIn order to turn off 1Click, the following command is required:nn```objcn[DPOneClickManager sharedInstance].enabled = NO;n```nnIn order to turn off only CVV saving, the following command is required:nn```objcn[DPOneClickManager sharedInstance].cvvStoreEnabled = NO;n```nn### ATTENTIONnAfter turning off aforementioned options, formerly saved credit card data is not removed. To remove that data, the following commands are required.nAn additional Developeru2019s duty is to create an option to remove saved credit card data. To find out, if credit card data are saved, the following command is required:nn```objcn[[DPOneClickManager sharedInstance] isDataAvailable];n```nnThe following method removes credit card data:nn```objcn[[DPOneClickManager sharedInstance] clearData];n```nnExecuting this method removes credit card number from Dotpay system and data stored locally.nThe option of removing only CVV number is also available. In order to check, if CVV is stored locally, the following method is required:nn```objcn[[DPOneClickManager sharedInstance] isCVVDataAvailable];n```nnIn order to remove CVV number only, the following method is required:nn```objcn[[DPOneClickManager sharedInstance] clearCVVData];n```nnn### Transaction history and statusnnSDK library offers saving and displaying transaction history. The transaction history also displays related operations, e.g. subsequently made refunds and other additional operations.nThe use of built-in controlnIn order to use built-in history control, the DPPaymentHistoryController controller has to be initialized and displayed:nn```objcnDPPaymentHistoryController *historyController = [[DPPaymentHistoryController alloc] initWithPaymentHistory:nil];n[self presentViewController:historyController animated:YES completion:NULL];n```nn### Changing presentation stylennA change of presentation way of controls elements in payment process is made with a use of the UIAppearance framework. Detailes are described in the chapter A change of presentation style.nA history controller, for which presentation change limitations may be applied to is `DPPaymentHistoryController`.nn#### Example:nn```objcn[[UIView appearanceWhenContainedIn: [DPPaymentHistoryController class], nil] setBackgroundColor:[UIColor redColor]];n```nnPersonal history controlnSDK library offers creating personal history control by downloading only data from the library, to better match web shop specificationnThe downloading payment history data is available in the paymentHistory attribute of singleton DPPaymentHistory:nn```objcnNSArray *paymentSummaries = [DPPaymentHistory sharedInstance].paymentHistory;n```nnAdditionally for transactions in personal history you can:n1. Remove a single transactionnn```objcn[[DPPaymentHistory sharedInstance] removePaymentSummary: paymentToRemove];n```nn2. Check current payment status for a record in the history and refresh displayed data:na. In personal view `DPPaymentHistoryObserver` observer methods are implemented, which refresh history view:nn```objcn- (void)paymentHistory:(DPPaymentHistory *)paymentHistory didUpdatePaymentSummary:(DPPaymentSummary *)paymentSummary;n- (void)paymentHistory:(DPPaymentHistory *)paymentHistory didFailedToUpdatePaymentSummary:(DPPaymentSummary *)paymentSummary withError:(NSError *)error;n```nnb. Register observer waiting for history changesnn```objcn[[DPPaymentHistory sharedInstance] registerObserver: self]n```nnc. Call out a method that updates payment status:nn```objcn[[DPPaymentHistory sharedInstance] updatePaymentSummary: paymentToUpdate];n```nnd. While releasing custom history controler, unregister history change observernn```objcn[[DPPaymentHistory sharedInstance] unRegisterObserver: self]n```nnLicensen----nn*Academic Free License ("AFL") v. 3.0*",
    "homepage": "https://github.com/dotpay/Mobile-SDK-iOS/",
    "license": {
        "type": "Academic Free License ("AFL") v. 3.0",
        "text": "Academic Free License ("AFL") v. 3.0nThis Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:nLicensed under the Academic Free License version 3.0n1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:na) to reproduce the Original Work in copies, either alone or as part of a collective work;nb) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;nc) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;nd) to perform the Original Work publicly; andne) to display the Original Work publicly.n2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.n3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.n4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.n5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).n6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.n7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.n8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.n9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).n10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.n11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.n12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.n13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.n14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.n15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.n16) Modification of This License. This License is Copyright u00a9 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.n"
    },
    "authors": {
        "DotPay": "[email protected]"
    },
    "source": {
        "http": "https://github.com/dotpay/Mobile-SDK-iOS/releases/download/1.4.17/dotpay_mobile_sdk_ios_1.4.17.zip"
    },
    "platforms": {
        "ios": "9.1"
    },
    "vendored_frameworks": "dotpay_mobile_sdk_ios_1.4.17/lib/DotPaySDK.framework",
    "requires_arc": true,
    "dependencies": {
        "VisaCheckoutSDK": [
            "~> 6.6.1"
        ]
    }
}

Pin It on Pinterest

Share This