Code Monkey home page Code Monkey logo

authorize_net_plugin's People

Contributors

jeremiahlukus avatar neel-sharma avatar okiring avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

authorize_net_plugin's Issues

zipCode should be made optional

Currently it appears one is forced to add a valid zip code when requesting a nonce however this is not mandatory in the SDK. Before migrating to null-safety this was fine but after the upgrade to sound null safety its required..Thea are some cases where one might not require a zip code.

[Feature Request] Allow creating and accessing customer profile/payment profile

Hi, @jeremiahlukus

As we discussed before in the previous issue, I want to create a customer profile, so the customer does not need to put his payment information again & again.

Main issue

Creating a customer profile need to send the information over HTTP. As shown in the example in the documentation of Authorize.Net. https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-payment-profile

{
  "createCustomerPaymentProfileRequest": {
      "merchantAuthentication": {
    "name": "API-KEY",
    "transactionKey": "TRANSACTION-KEY"
  },
    "customerProfileId": "10000",
    "paymentProfile": {
      "billTo": {
        "firstName": "John",
        "lastName": "Doe",
        "address": "123 Main St.",
        "city": "Bellevue",
        "state": "WA",
        "zip": "98004",
        "country": "US",
        "phoneNumber": "000-000-0000"
      },
      "payment": {
        "creditCard": {
          "cardNumber": "4111111111111111",
          "expirationDate": "2023-12"
        }
      },
      "defaultPaymentProfile": false
    },
    "validationMode": "liveMode"
  }
}

As well as, if I use the package, first I need to get Customer Payment Profile over HTTP and then put that information into authorizeNetToken() callback

AuthorizeNetPlugin.authorizeNetToken(
          env: 'test',
          cardNumber: '370000000000002',
          expirationMonth: '02',
          expirationYear: '2022',
          cardCvv: '900',
          zipCode: '30028',
          cardHolderName: 'Jeremiah',
          apiLoginId: '7594xDmRz',
          clientId:
              '34Fg4ta24e5Y6VQ8guqgUKguPLxW7EwqWWd2wSzCjwDUTN65w9SZ2Qk3p95X93cs');

This defeats the whole purpose of using the package while using customer profiles. Because there is an API available to execute without putting the information again. https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-customer-profile

{
    "createTransactionRequest": {
        "merchantAuthentication": {
            "name": "9bSaKC66uHg",
            "transactionKey": "8xszx7B7674QxHqe"
        },
        "refId": "123456",
        "transactionRequest": {
            "transactionType": "authCaptureTransaction",
            "amount": "45",
              "profile": {
    		  	"customerProfileId": "40338125",
    		  	"paymentProfile": { "paymentProfileId": "1000177237" }
  			},
            "lineItems": {
                "lineItem": {
                    "itemId": "1",
                    "name": "vase",
                    "description": "Cannes logo",
                    "quantity": "18",
                    "unitPrice": "45.00"
                }
            },
			"processingOptions": {
            "isSubsequentAuth": "true"
			},
			"subsequentAuthInformation": {
	             "originalNetworkTransId": "123456789123456",
	             "originalAuthAmount": "45.00",
	             "reason": "resubmission"
             
            },
			"authorizationIndicatorType": {
            "authorizationIndicator": "final"
            }
        }
    }
}

My thoughts

Because I want to keep app PCI compliant and don't want to send payment data over HTTP. I would like to use your package.

Can you please put some methods to execute creating customer profile and also charging it while using Under the hood SDK?

onErrorReceived should return error not success via method channel

This will always return success even when thea is an error.

@Override public void onErrorReceived(ErrorTransactionResponse errorResponse) { Message error = errorResponse.getFirstErrorMessage(); System.out.println("::::::::::::::::::::::::"); System.out.println( error.getMessageText()); System.out.println("::::::::::::::::::::::::"); if(channelResult!=null){ channelResult.success(error.getMessageText()); } }

This comes as success so the try/catch wont work when calling the AuthorizeNetPlugin.authorizeNetToken method

I/System.out(23569): :::::::::::::::::::::::: I/System.out(23569): failed to connect to apitest.authorize.net/198.241.206.22 (port 443) from /102.83.13.83 (port 33324) after 5000ms I/System.out(23569): ::::::::::::::::::::::::

RECOMMENDED FIX

channelResult.error({replace_with_any_code},error.getMessageText(),null);

Getting stuck in async call when card details are wrong

Scenarios where we enter a too long CVV. We get CVV Invalid error message in logs. But the app gets stuck in the await call. Need an exit. I'd suggest you add a callback in such scenarios where we are not getting proper response from the backend, so that we can easily distinguish between the success message and the failures.

Questions !

Is the process only uses AuthorizeNet servers,
How can I update my server with payment process result in order to deliver the service and generate an invoice?

Also is it possible to use payment Profile form mobile app?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.