sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Cannot use customer profile with API

Open usatenko opened this issue 10 years ago • 9 comments

    Merchant merchant = Merchant.createMerchant(authorizeEnvironment, authorizeLoginId, authorizeTransactionId);
    Subscription subscription = Subscription.createSubscription();
    subscription.setCustomerProfile(); <--- does not exist
    Transaction transaction = merchant.createARBTransaction(TransactionType.CREATE_SUBSCRIPTION, subscription);
    Result<Transaction> result = (Result<Transaction>) merchant.postTransaction(transaction);

usatenko avatar Jun 30 '16 09:06 usatenko

Hey @a1u,

You can use our new model to create subscription from a customer profile.

*API details are here * : http://developer.authorize.net/api/reference/index.html#recurring-billing-create-a-subscription-from-customer-profile

Sample code to create subscription from customer profile : https://github.com/AuthorizeNet/sample-code-java/blob/master/src/main/java/net/authorize/sample/RecurringBilling/CreateSubscriptionFromCustomerProfile.java

Let us know if you face any issues.

akankaria avatar Jul 01 '16 05:07 akankaria

thanks, yes, I forced to use your new model, but amount of code is a little bit massive, whereas your old API is more elegant. Anyway thanks for the answer.

usatenko avatar Jul 11 '16 14:07 usatenko

Hi a1u, thank you for the pull request. I've made a correction and sent a pull request. After the changes are merged, kindly verify that the change works.

Regards, Gabriel

gnongsie avatar Jul 26 '16 14:07 gnongsie

Hi @akankaria @usatenko @gnongsie , I want to create customer profile in Android Studio by using these dependencies -> implementation 'net.authorize:anet-java-sdk:2.0.1' implementation('javax.xml.bind:jaxb-api:2.3.0') implementation('javax.activation:activation:1.1') implementation('org.glassfish.jaxb:jaxb-runtime:2.3.0') implementation 'org.apache.logging.log4j:log4j-api:2.3'

I followed the lastest code , but i'm getting this error -> image

can you guide me?

MohsinIkram777 avatar Apr 05 '21 16:04 MohsinIkram777

Hi @MOhsain,

Can you kindly create a new issue for this?

gnongsie avatar Apr 05 '21 21:04 gnongsie

@gnongsie have you integrate this SDK in Android Studio?

MohsinIkram777 avatar Apr 06 '21 04:04 MohsinIkram777

@MOhsain, no, we have not integrated this SDK with Android Studio. There is an Android SDK specifically designed for use for EMV payment processing in Android OS.

If you want to use this SDK (since you are using Customer Profiles APIs), I can help you to integrate. But from a quick glance, it looks like there is something wrong with the way you are calling this.

For example, you should only get an error response if you cannot get an API response. And the error response may be something from the network or from your proxy server.

If you cannot get an API response, then check for error response. If you cannot get an error response after this, there is something wrong with the integration (maybe with the network).

I would need to see more of the code you are trying to integrate with this.

Kindly open a new issue so that we may have a more detailed discussion.

gnongsie avatar Apr 06 '21 10:04 gnongsie

Thanks for your reply, Here is my code kindly check please -> https://drive.google.com/file/d/18VKKwN_SfcefAFjlS3S9oKeswIIQsG1m/view?usp=sharing

On Tue, Apr 6, 2021 at 3:54 PM Gabriel Broadwin Nongsiej < @.***> wrote:

@MOhsain https://github.com/MOhsain, no, we have not integrated this SDK with Android Studio. There is an Android SDK https://github.com/AuthorizeNet/inperson-sdk-android specifically designed for use for EMV payment processing in Android OS.

If you want to use this SDK (since you are using Customer Profiles APIs), I can help you to integrate. But from a quick glance, it looks like there is something wrong with the way you are calling this.

For example, you should only get an error response if you cannot get an API response. And the error response may be something from the network or from your proxy server.

If you cannot get an API response, then check for error response. If you cannot get an error response after this, there is something wrong with the integration (maybe with the network).

I would need to see more of the code you are trying to integrate with this.

Kindly open a new issue so that we may have a more detailed discussion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AuthorizeNet/sdk-java/issues/90#issuecomment-814025910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLC2XP5ROM7ZLWDKDQBEUDTHLR6XANCNFSM4CIH7BPA .

MohsinIkram777 avatar Apr 06 '21 11:04 MohsinIkram777

Hi AuthorizeNet/sdk-java, I'm waiting for your response.

On Tue, Apr 6, 2021 at 4:38 PM Mohsan Ikram @.***> wrote:

Thanks for your reply, Here is my code kindly check please -> https://drive.google.com/file/d/18VKKwN_SfcefAFjlS3S9oKeswIIQsG1m/view?usp=sharing

On Tue, Apr 6, 2021 at 3:54 PM Gabriel Broadwin Nongsiej < @.***> wrote:

@MOhsain https://github.com/MOhsain, no, we have not integrated this SDK with Android Studio. There is an Android SDK https://github.com/AuthorizeNet/inperson-sdk-android specifically designed for use for EMV payment processing in Android OS.

If you want to use this SDK (since you are using Customer Profiles APIs), I can help you to integrate. But from a quick glance, it looks like there is something wrong with the way you are calling this.

For example, you should only get an error response if you cannot get an API response. And the error response may be something from the network or from your proxy server.

If you cannot get an API response, then check for error response. If you cannot get an error response after this, there is something wrong with the integration (maybe with the network).

I would need to see more of the code you are trying to integrate with this.

Kindly open a new issue so that we may have a more detailed discussion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AuthorizeNet/sdk-java/issues/90#issuecomment-814025910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLC2XP5ROM7ZLWDKDQBEUDTHLR6XANCNFSM4CIH7BPA .

MohsinIkram777 avatar Apr 09 '21 18:04 MohsinIkram777