Giter Site home page Giter Site logo

paybox-direct-plus's People

Contributors

arambert avatar dependabot[bot] avatar ewalk153 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paybox-direct-plus's Issues

Emetteur de carte inconnu

Hi,

I'm trying to use your gem but I always get a "Emetteur de carte inconnu" message while running

def credit_card(number = '1111222233334444', options = {})
  defaults = {
    number: number,
    month: '12',
    year: '2016',
    first_name: 'Longbob',
    last_name: 'Longsen',
    verification_value: '123',
    brand: 'visa'
  }.update(options)

  ActiveMerchant::Billing::CreditCard.new(defaults)
end

@gateway = ActiveMerchant::Billing::PayboxDirectPlusGateway.new(
  login:    my_login,
  password: my_password
)


@amount = 100
@credit_card = credit_card

@options = {
  order_id:       "REF#{Time.now.usec}",
  user_reference: "USER#{Time.now.usec}",
  devise: '978',
}

response = @gateway.subscriber_create(@amount, @credit_card, @options)

Any Idea ? I used my credential to enter my prepared admin link.

Notice that devise field looks like a mandatory field !

Is there a way to simulate errors ?

Hi !

Many thanks for this gem! In the Paybox Direct doc, they say we can simulate error codes by submitting a variable called ERRORCODETEST. Is there a way to this with this library ?

Many thanks by advance.

Sylvain

NoMethodError "gateway_customer_profile_id"

Hi,
thanks for your work on implementing the "PLUS" feature of Paybox. I'm also working on this :).

In your code you use creditcard.gateway_customer_profile_id.

This attribute is not implemented in ActiveMerchant::Billing::CreditCard object resulting in NoMethodError.

Can you give explanation in the README or in the code on how you implemented this attribute (monkey-patch ?)..?

Thanks,

Nicolas Blanco.

Add support for Response.authorization field

A few of the ActiveMerchant::Billing::Response attributes are based on "magic" from the params and options hash.

Moving

            :test => test?,
            :authorization => response[:numappel].to_s + response[:numtrans].to_s,
            :fraud_review => fraud_review?(response),

from params to options enable these fields to be accessible directly. Authorization field example

Options include moving the fields from params to options, or duplicating them for backwards support where people may already be accessing them via Response.params.
Happy to put up a pull request.

Error when executing a "credit"

When I try to execute a "credit", I receive the following error: Mandatory values missing keyword:11 Type:21

Here is remote test that I wrote to demonstrate the problem:

  def test_create_profile_capture_and_credit
    assert response = @gateway.create_payment_profile(@amount, @credit_card, @options)
    assert_success response

    credit_card_reference = response.params["credit_card_reference"]
    assert_not_nil credit_card_reference

    assert capture = @gateway.capture(@amount, response.params["authorization"], @options)
    assert_success capture

    assert credit = @gateway.credit(@amount, capture.params["authorization"], @options)
    assert_equal 'The transaction was approved', credit.message
    assert_success credit
  end

Credit implementation

When I tried to use credit using the implementation provided in the gem, it didn't work for me (Paybox returned me network errors). I had to overload the implementation to make it work (only tested in test mode yet). Here is how I did it :

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class PayboxDirectPlusGateway < Gateway
      def credit(money, creditcard, options = {})
        post = {}
        add_invoice(post, options)
        add_creditcard(post, creditcard, options)
        add_user_reference(post, options)
        commit('subscriber_credit', money, post)
      end
    end
  end
end

00005: Numéro de question invalide - Increase timeout between first and secondary requests

Hi,

We have sometimes a "00005: Numéro de question invalide" response error when the payment have been set as succeed.

After digging in Paybox logs with Paybox support, we figured out that the problem come from the timeout of the first request to ppps.paybox.com which isn't waiting for 30s at least to call another request to ppps1.paybox.com which is trying to perform the same payment again.

The first request to ppps.paybox.com is succeed.
The second request to pps1.paybox.com have the error "00005: Numéro de question invalide" because already treated by the first request.

My question is, how can I increase the timeout of the first request?

Thanks for any help, and btw thanks for your plugin.

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.