Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Securepay test url #278

Closed
ma2tdu59 opened this issue Feb 24, 2012 · 1 comment
Closed

Securepay test url #278

ma2tdu59 opened this issue Feb 24, 2012 · 1 comment

Comments

@ma2tdu59
Copy link

Hi,

I'm using activemerchant for a securepay gateway in my rails app. I use that code :

ActiveMerchant::Billing::Base.mode = :test

            credit_card = ActiveMerchant::Billing::CreditCard.new(
                        :first_name         => 'Bob',
                        :last_name          => 'Bobsen',
                        :number             => '4444333322221111',
                        :month              => 10,
                        :year               => 2015,
                        :verification_value => '123',
                        :type               => 'visa'
            )

            options = {
                        :order_id => '1230123',
                        :email => 'bob@testbob.com',
                        :address => { :address1 => 'Level 1/224 Swan St', 
                                :address2=>"",
                                :city => 'Richmond', 
                                :state => 'Victoria',
                                :zip  => '3121', 
                                :country => 'AU'
                              },
                        :description => 'purchased items'
            }

            #Validating the card automatically detects the card type
            if credit_card.valid?
                gateway = ActiveMerchant::Billing::SecurePayGateway.new(:login => 'ABC0001',:password => 'abc123')
                response = gateway.purchase(1000, credit_card, options)
                p response

                if response.success?
                    gateway.capture(1000, response.authorization)
                    puts "Successfully charged $#{sprintf("%.2f", amount / 100)} to the credit card #{credit_card.display_number}"

                end
            end

Each time, i got this response : AVS data is invalid or AVS is not allowed for this card type.

That's why I called Securepay and they told me the url used for test is wrong and is actually :

https://test.securepay.com.au/xmlapi/payment

Can you tell more on that ? Do I got something wrong ?

Thanks in advance,

Matt

@ntalbott
Copy link
Contributor

It looks like ActiveMerchant may have the wrong URL:

https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/gateways/secure_pay_au.rb#L8

If so, we'd happily accept a Pull Request that fixed it; just be sure to run the remote tests and make sure they all still pass afterwards. Closing this; feel free to re-open with more data or (preferably) open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants